Last active
December 20, 2017 18:00
-
-
Save heywoodlh/1997862f8948015d5d814f046f75271f to your computer and use it in GitHub Desktop.
Simple kiosk script for the Raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## See https://obrienlabs.net/setup-raspberry-pi-kiosk-chromium/ for more information | |
| ## Add this one liner to the end of ~/.config/lxsession/LXDE-pi/autostart after downloading this script to /home/pi/kiosk.sh and making it executable: | |
| ## @/home/pi/kiosk.sh | |
| WEBSITE='https://google.com' | |
| # Hide the mouse from the display | |
| unclutter & | |
| # If Chrome crashes (usually due to rebooting), clear the crash flag so we don't have the annoying warning bar | |
| 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 | |
| # Run Chromium and open tabs | |
| /usr/bin/chromium-browser --kiosk "$WEBSITE" & | |
| # Start the kiosk loop. This keystroke changes the Chromium tab | |
| # To have just anti-idle, use this line instead: | |
| # xdotool keydown ctrl; xdotool keyup ctrl; | |
| # Otherwise, the ctrl+Tab is designed to switch tabs in Chrome | |
| # # | |
| while (true) | |
| do | |
| xdotool keydown ctrl+Tab; xdotool keyup ctrl+Tab; | |
| sleep 15 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment