Skip to content

Instantly share code, notes, and snippets.

@x-zvf
Created April 20, 2024 09:45
Show Gist options
  • Save x-zvf/018ffb5f19d0ebd32c2c2f9e25d62ba7 to your computer and use it in GitHub Desktop.
Save x-zvf/018ffb5f19d0ebd32c2c2f9e25d62ba7 to your computer and use it in GitHub Desktop.
Raspberry PI kiosk

Raspberry Pi Kiosk with Read-only Filesystem

Create a simple Raspberry Pi image which will display a fullscreen webpage on boot.

Set up

  1. Install 32bit legacy Raspberry PI OS (because 64bit chromium is somewhow worse than 32bit)
    • tip: Use RPI imager to enable Wifi + SSH
  2. Use gui settings->screen configuration to set screen orientation
  3. Open chromium -> settings -> DISABLE Use hardware acceleration (yes, it is even worse with HA)
  4. install unclutter: sudo apt update && sudo apt install unclutter
  5. Create the file /home/<THE USER>/.config/.config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xset s off
@xset -dpms
@xset xset s noblank
@unclutter -idle 1
@chromium-browser --app=https://example.com --start-fullscreen --check-for-update-interval=31536000 --incognito
  1. reboot and check if everything is working correctly
  2. Finally, enable OverlayFS: sudo raspi-config -> performance options -> overlay file system -> yes -> (write protect boot: yes)
  3. reboot

Now you can just plug and unplug the pi, without needing to fear file-system corruption. But none of your changes are saved!

To make any further changes, you must:

  1. Disable OverlayFS in raspi-config
  2. reboot
  3. make & test your changes
  4. re-enable OverlayFS
  5. reboot

Check if filesystem is read-only

~$ mount if / is mounted rw, it is not, otherwise it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment