gabrielSant95 / kiosk-mode

linux mint to mode kiosk
0 stars 0 forks source link

mode kiosk mode linux mint wilma #1

Open gabrielSant95 opened 10 hours ago

gabrielSant95 commented 10 hours ago

transform you linux mint into kiosk mode

gabrielSant95 commented 10 hours ago

!/bin/bash

be new

apt-get update

get software

apt-get install \

unclutter \

xorg \

chromium \

openbox \

lightdm \

locales \

-y

dir

mkdir -p /home/kiosk/.config/openbox

create group

groupadd kiosk

create user if not exists

id -u kiosk &>/dev/null || useradd -m kiosk -g kiosk -s /bin/bash

rights

chown -R kiosk:kiosk /home/kiosk

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 \

--autoplay-policy=no-user-gesture-required \

--disable-features=translate \

--ignore-certificate-errors \

--disable-web-security \

--remember-cert-error-decisions \

--start-maximized \

--disable-suggestions-service \

--disable-save-password-bubble \

--disable-session-crashed-bubble \

--incognito \

--kiosk "https://YOU_URL"

--start-maximized \

--kiosk "https://YOU_URL/"

sleep 5

done &

EOF

echo "Done!"