RaspberryPi Kiosk Mode Explained
by kacang bawang
Just some notes on getting the raspberrypi kiosk mode going at the time of this writing (Jun 2017).
Basically, the whole thing boils down to:
1. Install the graphical Raspbian image (not the minimal), and then install chromium-browser via apt-get.
2. Make browser start automatically at logon.
3. Launch browser in kiosk mode.
Here are the hickups:
1. Adding something to xwindows’ auto start
This shoud be easy, in principle. Open autostart
and add more lines that start with an ‘@’. Except there are several such autostarts and without knowing which takes priority, it is easy to get frustrated. On my machine there are at least the following:
1 2 3 4 5 |
/etc/xdg/lxsession/LXDE-pi/autostart /etc/xdg/lxsession/LXDE/autostart /etc/xdg/openbox/autostart /etc/xdg/autostart /home/pi/.config/lxsession/LXDE-pi/autostart |
It is indeed the last one that takes precedence over all others if it happens to exist. So, make changes to that one. Explanation
2. Browser settings for kiosk mode
This should also be easy, just run chromium-browser --help
and find the option for kiosk mode. Except it is not there… oops. (Version Chromium 56.0.2924.84). There is an --app
option, but it doesn’t result in kiosk mode. Anyways, the option you want is --kiosk
(naturally), it’s just that it is an unlisted option and so it doesn’t show up in the help.
In summary, here is the line to add to /home/pi/.config/lxsession/LXDE-pi/autostart
1 |
@/usr/bin/chromium-browser --kiosk http://my.web.site |
Lastly you may or may not want to do the following in addition to above (but you’ll have to search for it yourself – there’s plenty of info). They are all optional.
? Turn off screen saver/screen blanking/power management
? Turn off mouse cursor
? Run in incognito mode to disable requests to restore previous session