From 1974d0b9a94b4fcaa737855a5ebc4b4e2997bd54 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Thu, 18 Dec 2025 18:09:39 +0100 Subject: [PATCH 1/3] chore: Adds cage and firefox-esr packages --- post_install.sh | 8 +++++++- preseed.cfg | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/post_install.sh b/post_install.sh index 4ff2943..b721751 100644 --- a/post_install.sh +++ b/post_install.sh @@ -71,4 +71,10 @@ Environment=DISPLAY=:0 [Install] WantedBy=graphical.target EOF -systemctl enable firefox-kiosk.service \ No newline at end of file +systemctl enable firefox-kiosk.service + +tee /home/kiosk/.bash_profile > /dev/null <<'EOF' +if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then + exec sway +fi +EOF \ No newline at end of file diff --git a/preseed.cfg b/preseed.cfg index 7518b53..b934651 100644 --- a/preseed.cfg +++ b/preseed.cfg @@ -51,6 +51,8 @@ d-i pkgsel/include string \ openbox \ chromium \ sudo \ + cage \ + firefox-esr \ curl d-i pkgsel/exclude string gnome-software From 8538c63c4575b776f6e6f71a32f374b2e5e1387c Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Thu, 18 Dec 2025 18:17:40 +0100 Subject: [PATCH 2/3] chore: Disables firefox service --- post_install.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/post_install.sh b/post_install.sh index b721751..f106c15 100644 --- a/post_install.sh +++ b/post_install.sh @@ -54,24 +54,24 @@ tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<'EOF' } EOF chown -R kiosk:kiosk /home/kiosk/.config -tee /etc/systemd/system/firefox-kiosk.service > /dev/null <<'EOF' -[Unit] -Description=Firefox Kiosk -After=graphical.target -Wants=graphical.target +# tee /etc/systemd/system/firefox-kiosk.service > /dev/null <<'EOF' +# [Unit] +# Description=Firefox Kiosk +# After=graphical.target +# Wants=graphical.target -[Service] -User=kiosk -Type=simple -ExecStart=/usr/bin/firefox --kiosk https://mahn.ke -Restart=always -RestartSec=5 -Environment=DISPLAY=:0 +# [Service] +# User=kiosk +# Type=simple +# ExecStart=/usr/bin/firefox --kiosk https://c3nav.ke +# Restart=always +# RestartSec=5 +# Environment=DISPLAY=:0 -[Install] -WantedBy=graphical.target -EOF -systemctl enable firefox-kiosk.service +# [Install] +# WantedBy=graphical.target +# EOF +# systemctl enable firefox-kiosk.service tee /home/kiosk/.bash_profile > /dev/null <<'EOF' if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then From 502e332180c3fbb4b30ce7a7c2c55c4efcce1796 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Thu, 18 Dec 2025 18:17:54 +0100 Subject: [PATCH 3/3] refactor: Starts firefox inside cage --- post_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post_install.sh b/post_install.sh index f106c15..44423ba 100644 --- a/post_install.sh +++ b/post_install.sh @@ -75,6 +75,6 @@ chown -R kiosk:kiosk /home/kiosk/.config tee /home/kiosk/.bash_profile > /dev/null <<'EOF' if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then - exec sway + exec cage firefox --kiosk https://c3nav.de fi EOF \ No newline at end of file