Skip to content

Instantly share code, notes, and snippets.

@wess
Created November 30, 2017 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wess/d5f7aba01b5f6e813fdca49d174b9e78 to your computer and use it in GitHub Desktop.
Save wess/d5f7aba01b5f6e813fdca49d174b9e78 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Run this script in display 0 - the monitor
export DISPLAY=:0
# 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 --window-size=480,320 --kiosk --window-position=0,0 https://google.com https://bing.com &
# 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