Skip to content

Instantly share code, notes, and snippets.

@spokanemac
Last active October 27, 2018 23:44
Show Gist options
  • Save spokanemac/089911c34cf14dfca11bdf0dff5028bb to your computer and use it in GitHub Desktop.
Save spokanemac/089911c34cf14dfca11bdf0dff5028bb to your computer and use it in GitHub Desktop.
Chrome Kiosk launch script for Raspberry Pi
#!/bin/bash
# Stop the Raspberry Pi’s display power management system from kicking in and blanking out the screen.
xset s noblank
xset s off
xset -dpms
# hide the cursor
unclutter -idle 0.5 -root &
# Use sed to clear out flags from Chromium preferences file that would make the warning bar appear
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
# Finally, let's launch the browser
/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk https://yoururl.com &
# Uncomment to add a screen refresh.
# while true; do
# xdotool keydown ctrl+Tab; xdotool keyup ctrl+Tab;
# sleep 10
# done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment