Configuring a Raspberry Pi in Kiosk Mode with Chromium Browser on Mac
This guide outlines how to setup a Raspberry Pi in kiosk mode with Chromium. There are many tutorials on the internet that outline how to do it, but I always found myself needing to add an additional step or command that wasn’t included in the guide.
As a result, I decided to compile everything into one guide so that you can be confident that it will work after following this guide step-by-step.
The following testing was done using;
Whilst the steps should work on different versions of Raspbian and different Raspberry Pi models, I can’t guarantee it. Other browsers such as Midori can also be setup with great effect by changing the file in the last step to suit the different browser.
Initial Raspberry Pi download and SD Card formatting
Firstly, download the latest version of Raspberry Pi from raspberrypi.org. I recommend downloading the full version of whatever is currently available.
For this testing I am using Raspbian Jessie 2016-05-27 which is the latest at the time of writing.
Insert the SD card into your computer, and then open Disk Utility by searching for it in the Spotlight toolbar (cmd + space). Select the SD Card, navigate to the erase tab and click erase.
Next open up a Terminal window and enter the following:
diskutil unmountDisk /dev/diskX
sudo dd bs=1m if=<your image file>.img of=/dev/diskX
Next insert your SD Card into the Raspberry Pi and boot it up.
Raspbian Jessie Kiosk Mode post-installation steps
Open another terminal window and run sudo apt-get update. This will update any packages that need updating and ensures that we have the latest versions of programs before we proceed.
Next, do the sudo raspi-config.
Installing the Chromium Browser in Kiosk Mode
Unfortunately as of Raspbian Jessie, Chromium is no longer in the official repositories for Raspberry Pi so you need to add them manually. Do them one by one to stop any errors from occurring.
Note: It is MUCH easier to SSH into the Pi and copy paste these packages instead of trying to type it out manually.
Enter the command ifconfig into the Raspberry Pi terminal to find out the IP address of the Pi if you want to SSH into it.
I highly recommend you also install the application Unclutter which hides the mouse cursor so it can’t be seen when you put the Pi into kiosk mode.
sudo apt-get install unclutter
Setting up Chromium Browser Kiosk Mode to Autostart on boot
We need to now configure the Chromium to autostart upon restart or startup. (At least on Raspbian Jessie) it’s important to modify the autostart file in the Pi user’s home directory.
Editing the global file will not work.
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
Comment out the screensaver option by adding a # to the beginning.
Next add xset options to disable power saving options:
@xset s off
@xset s noblank
Finally, you need to add switches to start Chromium in kiosk mode and choose which URL it should open.
@chromium-browser –noerrdialogs –kiosk –incognito https://www.google.com
A full list of switches to add can be found here.
Restart and the desktop should now auto-login and display a full-screen Chromium window.
Unfortunately, there is no easy way to make Chromium auto-refresh. If you need auto-refresh try the Midori browser which has auto-refresh built into it. If there is enough interest, I will write up a guide on how to configure a Raspberry Pi Kiosk Browser with Midori.
[content-egg module=Amazon next=1]