Kiosk mode is usefull if you want a low power power solution to just show a dashboard with a Raspberry Pi for example.
I personally use this with MagicMirror in a Server/Client setup. I just mounted a Raspberry Pi behind a monitor with the basic Raspberry Pi image.
There isn't much to it to setup Kiosk Mode. So allow me to explain where to make the changes and what each option does.
This only works if the system is set to auto-login, if you don't the system will just stop at the login screen until you login.
For security reasons, I would suggest you create a new user with the minimum rights required to run this and auto-login into it and configure the browser startup there.
You can also opt for logging in by hand everytime, it's up to you.
- On the machine itself open Terminal or SSH into it
- Enter the following command:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Do note that this command is for the LXDE GUI on Raspberry Pi, if you are running this on a different distribution or different GUI that the LXDE-pi part will be a different path
If you only have one GUI, then usecd /etc/xdg/lxsession
and then typels
ordir
to list the folders, with one GUI you should only find one folder if there are more, you will need to figure out what GUI came installed with your installation - Replace the entire file with the following lines:
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xset s off
@xset -dpms
@xset s noblank
/usr/bin/chromium-browser --kiosk --disable-infobars --ignore-certificate-errors --disable-restore-session-state <webaddress here>
adjust the @lxpanel and @pcmanfm lines with the GUI you use
Now what does @xset do? Let me explain this line by line
@xset s off will disable the screensaver
@sset -dpms will disable the power saving features
@xset s noblank will prevent the screen from going blank
Now for the last part, this tells the system to start the chromium browser, the arguments after it will do the following
kiosk this is kinda self explanatory right?
disable-infobars this disables the notifications on the screen like updates being ready
ignore-certificate-errors if you present a self-hosted site with a self-signed cert then you will always get a certificate warning page. Use this argument to bypass the warning and make kiosk mode load the page directly.
disable-restore-session-state should the browser or system crash, you don't really want the browser to remember the last session, add this so that it doesn't.
lastly you add the website you want it to open at the end, it is possible to enter multiple sites, each site will be opened in a seperate tab. To cycle through them you would need a script or something.
I don't have the requirement to do that (yet) so sadly I have no script available. - Now save your changes by pressing CTRL+O and then CTRL+X to exit
- Reboot your system and check if Chrome starts