Pronoy Chopra

Pronoy Chopra


© Pronoy Chopra 2022

Theme: plainwhite

Raspberry Pi - Chromium on boot in kiosk mode

Recently, I built this using Django. It’s my Gym’s leaderboard running on a Digital Ocean droplet. I decided to use a Raspberry Pi running perpetually displaying the leaderboard in the gym. Apparently it has become a huge motivator (even for me).

However, getting chromium to launch isn’t all that straightforward so I am jotting down what I know

sudo vim /etc/xdg/lxsession/LXDE-pi/autostart
#@xscreensaver -no-splash  # comment this line out to disable screensaver
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --noerrdialogs --force-device-scale-factor=1.25 --kiosk  

One thing that really bothers me is that the file system crashes if the Pi isn’t shut down properly (multiple times). I found a post talking about making the root file system read-only which led me to the documentation. However, if you do mark the partition read-only the Desktop won’t boot.

So to undo that, you gotta re-mount /etc/fstab as non-read-only.

So the only viable option is to create a new writable filesystem and keep it in the RAM and mark the root as read-only. This post talks about it in detail. I’ll tinker with that later so that I can mount a writeable file system in an external drive or create a new partition during install.