Skip to content

Instantly share code, notes, and snippets.

@RafhaanShah
Last active December 10, 2020 13:24
Show Gist options
  • Save RafhaanShah/f784fccff231525b3ac89b0a1ecddfdd to your computer and use it in GitHub Desktop.
Save RafhaanShah/f784fccff231525b3ac89b0a1ecddfdd to your computer and use it in GitHub Desktop.
Use Raspberry Pi as a Chrome kiosk
#!/bin/bash
set -e
export DISPLAY=:0.0
# add to /etc/xdg/lxsession/LXDE-pi/autostart
# unclutter -idle 5
# @xset s noblank
# @xset s off
# @xset -dpms
xset dpms force on # use off for turning the screen off
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences
# --force-device-scale-factor=0.7 for zoom
nohup /usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk 'https://www.google.com' >/dev/null 2>&1 &
# https://pimylifeup.com/raspberry-pi-kiosk/
# https://www.geeks3d.com/hacklab/20160108/how-to-disable-the-blank-screen-on-raspberry-pi-raspbian/
# https://lemariva.com/blog/2020/08/raspberry-pi-4-video-acceleration-decode-chromium
# Also see https://github.com/guysoft/FullPageOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment