#!/bin/bash # Start X server in the background /usr/bin/Xorg :0 -nocursor vt1 -nolisten tcp -keeptty & XPID=$! sleep 2 # Check if X started if ! kill -0 $XPID 2>/dev/null; then echo 'ERROR: Xorg failed to start' exit 1 fi export DISPLAY=:0 export HOME=/home/archipelago # Allow archipelago user to connect xhost +SI:localuser:archipelago 2>/dev/null # Disable screen blanking xset s off 2>/dev/null xset -dpms 2>/dev/null xset s noblank 2>/dev/null # Hide cursor unclutter -idle 3 -root & # Run Chromium as archipelago user in a restart loop while true; do sudo -u archipelago env DISPLAY=:0 HOME=/home/archipelago chromium --kiosk --app=http://localhost/kiosk --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --disable-features=TranslateUI --disable-session-crashed-bubble --disable-save-password-bubble --disable-suggestions-service --disable-component-update --disable-gpu --user-data-dir=/home/archipelago/.config/chromium-kiosk sleep 3 done # Cleanup kill $XPID 2>/dev/null