How to manually reload Chromium Kiosk

Problem:

You are running a Chromium Kiosk e.g. on a Raspberry Pi using a command like

chromium_kiosk_cmd.sh
chromium-browser --noerrdialogs --disable-infobars --disk-cache-dir=/dev/null --disk-cache-size=1 --kiosk http://localhost

e.g. in /etc/xdg/openbox/autostart, but you don’t know how to manuy reload the Kiosk e.g. after you have changed the underlying website

Solution

In /etc/xdg/openbox/autostart or wherever your chromium-browser command is, enclose it in

chromium_kiosk_cmd.sh
while true ; do [CHROMIUM COMMAND] ; sleep 1 ; done

The complete command would look like this, for example:

chromium_kiosk_wrapper.sh
while true ; do chromium-browser --noerrdialogs --disable-infobars --disk-cache-dir=/dev/null --disk-cache-size=1 --kiosk http://localhost ; sleep 1 ; done

Now, to manually reload Chromium, all you have to do is to kill the process using

kill_chromium.sh
killall /usr/lib/chromium-browser/chromium-browser-v7

This will kill the Chromium process and the while loop will automatically restart it after one second.

In case you see an error message like

chromium_missing_executable.txt
/usr/lib/chromium-browser/chromium-browser-v7: No such file or directory

you need to find out which executable is used for Chromium in order to pass that to killall. To find out the name of the executable, use

find_chromium_process.sh
ps a | grep -i chromium

and look for a string similar to /usr/lib/chromium-browser/chromium-browser-v7.


Check out similar posts by category: Embedded, Linux