Added a systemd service, as well as sway
This commit is contained in:
parent
74407287b7
commit
46a73dfb9e
2 changed files with 53 additions and 4 deletions
|
|
@ -1,4 +1,7 @@
|
|||
printf "[daemon]\nAutomaticLoginEnable=true\nAutomaticLogin=kiosk\n\n[security]\n\n[xdmcp]\n\n[chooser]\n\n[debug]\n" > /etc/gdm3/daemon.conf
|
||||
|
||||
|
||||
# Firefox policy
|
||||
mkdir -p /usr/lib/firefox-esr/distribution
|
||||
tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<'EOF'
|
||||
{
|
||||
|
|
@ -53,10 +56,55 @@ tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<'EOF'
|
|||
}
|
||||
}
|
||||
EOF
|
||||
chown -R kiosk:kiosk /home/kiosk/.config
|
||||
|
||||
# Bash autostart of sway
|
||||
tee /home/kiosk/.bash_profile > /dev/null <<'EOF'
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec cage firefox --kiosk https://c3nav.de
|
||||
exec sway
|
||||
fi
|
||||
EOF
|
||||
EOF
|
||||
|
||||
# Sway config
|
||||
mkdir -p /home/kiosk/.config/sway/
|
||||
tee /home/kiosk/.config/sway/config > /dev/null <<'EOF'
|
||||
input type:pointer {
|
||||
events disabled
|
||||
}
|
||||
|
||||
input type:keyboard {
|
||||
events disabled
|
||||
}
|
||||
|
||||
input type:touch {
|
||||
events enabled
|
||||
}
|
||||
|
||||
input * xkb_layout de
|
||||
|
||||
## This may not be needed if there is a systemd unit
|
||||
# exec_always firefox --wayland --kiosk
|
||||
EOF
|
||||
|
||||
|
||||
# Systemd unit
|
||||
mkdir -p /home/kiosk/.config/systemd/user/
|
||||
tee /home/kiosk/.config/systemd/user/firefox-kiosk.service > /dev/null <<'EOF'
|
||||
service
|
||||
[Unit]
|
||||
Description=Firefox im Kiosk-Mode
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
TimeoutStartSec=0
|
||||
ExecStart=/usr/bin/firefox --kiosk
|
||||
Environment=DISPLAY=:0
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
mkdir -p /home/kiosk/.config/systemd/user/default.target.wants/
|
||||
ln -s /home/kiosk/.config/systemd/user/firefox-kiosk.service /home/kiosk/.config/systemd/user/default.target.wants/firefox-kiosk.service
|
||||
|
||||
|
||||
chown -R kiosk:kiosk /home/kiosk/.config
|
||||
|
|
@ -53,7 +53,8 @@ d-i pkgsel/include string \
|
|||
sudo \
|
||||
cage \
|
||||
firefox-esr \
|
||||
curl
|
||||
curl \
|
||||
sway
|
||||
|
||||
d-i pkgsel/exclude string gnome-software
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue