A Raspberry Pi kiosk system as set up here is intended to open a browser on startup, showing and regularly refreshing a given website, e.g. a system status, weather information, transport schedules and thelike.
To set up this kiosk system, we need
a Raspberrby Pi, installed with a standard Ubuntu server image
a monitor (touch functionality optional)
Based on a standard Ubuntu server image, we have to add some necessary components first:
openboxis a light-weight and fast window manager, the xdg-utils are tools for the graphical user interface, xinit starts the X server, and the xdotool we’ll use to send instructions from the command line to applications running within the X environment.
Next, we install Google Chrome as snap package:
Now, we have to amend the /etc/xdg/openbox/autostart file in order to switch off all screen savers, activate ctrl+alt+backspace for stopping the X server (for debugging purposes when we are at the console), clean up after a chromium crash, and finally start chromium and load the desired website after waiting some time. (This workaround was necessary due to the fact that Chrome loses every URL that might be given as command line parameter for start on the first refresh. If you know how to fix this better, please let me know.)
In order to have the X server started after login, we are adding to our user’s .bashrc the line
In order to login automatically on boot, we create a service unit /lib/systemd/system/getty@.service as follows:
In the Servicesection, please replace pi by the username of your local user.
We make the service available at boot time by
Finally, in order to refresh the browser view every minute, we add the following entry to /etc/crontab:
Again, replace pi by your local user.
That’s it! Now we have a kiosk system on a Pi booting into a chrome browser that loads and refreshes a given website every minute.