1. Install xdotool
sudo apt install xdotool
2. Create a kiosk script
/usr/bin/kiosk.sh
#!/bin/bash
# Run this script in display 0 - the monitor
export DISPLAY=:0
# Hide the mouse from the display
unclutter &
# If Chromium 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/debix/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/debix/.config/chromium/Default/Preferences
# Run Chromium and open tabs
/usr/bin/chromium --window-size=1920,1080 --kiosk --window-position=0,0 http://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
3. Create kiosk script to autostart
/home/debix/.config/autostart/kiosk.desktop
[Desktop Entry]
Version=1.0
Name=kiosk
Exec=/usr/bin/kiosk.sh
#Exec=/bin/chromium --window-size=1920,1080 --kiosk --window-position=0,0 http://bing.com
Terminal=true
Type=Application
4. Default sudo, no password required
Add the following to the end of the /etc/sudoers file:
debix ALL=(ALL) NOPASSWD : ALL