-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathkiosk-installer.sh
75 lines (63 loc) · 1.4 KB
/
kiosk-installer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/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
[Seat:*]
autologin-user=jos
autologin-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://neave.tv/"
sleep 5
done &
EOF
echo "Done!"