Skip to content

Instantly share code, notes, and snippets.

@Deadlyelder
Last active October 3, 2023 11:58
Show Gist options
  • Save Deadlyelder/c7a4da3ee006217af6c4d667eea9bb49 to your computer and use it in GitHub Desktop.
Save Deadlyelder/c7a4da3ee006217af6c4d667eea9bb49 to your computer and use it in GitHub Desktop.
attempt three
#!/bin/bash
# remove virtual consoles
if [ -e "/etc/X11/xorg.conf" ]; then
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
fi
cat > /etc/X11/xorg.conf << EOF
Section "ServerFlags"
Option "DontVTSwitch" "true"
EndSection
EOF
# create config
if [ -e "/etc/lightdm/lightdm.conf" ]; then
mv /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.backup
fi
cat > /etc/lightdm/lightdm.conf << EOF
[SeatDefaults]
autologin-user=kiosk
user-session=openbox
EOF
# create autostart
if [ -e "/home/kiosk/.config/openbox/autostart" ]; then
mv /home/kiosk/.config/openbox/autostart /home/kiosk/.config/openbox/autostart.backup
fi
cat > /home/kiosk/.config/openbox/autostart << EOF
#!/bin/bash
unclutter -idle 0.1 -grab -root &
while :
do
xrandr --auto
chromium \
--no-first-run \
--start-maximized \
--disable \
--disable-translate \
--disable-infobars \
--disable-suggestions-service \
--disable-save-password-bubble \
--disable-session-crashed-bubble \
--incognito \
--kiosk "https://icrc.org/"
sleep 5
done &
EOF
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment