# Disable any form of screen saver / screen blanking / power management
xset s off
xset s noblank
xset -dpms

# Allow quitting the X server with CTRL-ATL-Backspace
setxkbmap -option terminate:ctrl_alt_bksp

# Start Chromium in kiosk mode
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' \
  ~/snap/chromium/common/chromium/Local\ State
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' \
  ~/snap/chromium/common/chromium/Default/Preferences

chromium-browser --disable-infobars --noerrdialogs \
  --disable-session-crashed-bubble --disable-component-update \
  --overscroll-history-navigation=0 --disable-features=Translate \
  --kiosk '{{ kiosk_url }}'
  
