From 9d27fe9323e901d32c476a4fdc5a4d5be8d6e3a2 Mon Sep 17 00:00:00 2001 From: Mitchell R Date: Sun, 24 May 2026 05:22:54 +0200 Subject: [PATCH] =?UTF-8?q?fix(kiosk):=20nuclear=20piwiz=20kill=20?= =?UTF-8?q?=E2=80=94=20purge=20entire=20desktop=20+=20force=20cmdline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Piwiz still appeared after package purge alone. Now: 1. Purge ALL desktop packages (lxde, labwc, wayfire, lightdm, xorg) 2. autoremove orphaned deps 3. Force systemd.unit=multi-user.target in kernel cmdline No desktop = no piwiz. Period. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../01-install-kiosk/01-run-chroot.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/01-run-chroot.sh b/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/01-run-chroot.sh index 9a2e63b..a07e4cb 100755 --- a/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/01-run-chroot.sh +++ b/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/01-run-chroot.sh @@ -208,13 +208,21 @@ rm -f /etc/systemd/system/getty.target.wants/* 2>/dev/null || true printf 'BetterFrame Kiosk\n\n' > /etc/issue rm -f /etc/update-motd.d/* 2>/dev/null || true +# Nuke entire desktop environment if installed (stage3 leftovers). +# This is the nuclear option — piwiz can't run if there's no desktop. +apt-get -y purge 'lx*' 'labwc*' 'wayfire*' 'wf-*' lightdm gdm3 sddm \ + xserver-xorg-core xwayland rpd-plym-splash pi-greeter \ + desktop-base raspberrypi-ui-mods 2>/dev/null || true +apt-get -y autoremove 2>/dev/null || true + +# Force multi-user via kernel cmdline (overrides any default target) # Boot config: quiet splash + no rainbow. if [ -f /boot/firmware/cmdline.txt ]; then BOOT_DIR=/boot/firmware else BOOT_DIR=/boot; fi CMDLINE="${BOOT_DIR}/cmdline.txt" CONFIG="${BOOT_DIR}/config.txt" if [ -f "$CMDLINE" ]; then - for flag in quiet splash plymouth.ignore-serial-consoles loglevel=0 vt.global_cursor_default=0 logo.nologo; do + for flag in quiet splash plymouth.ignore-serial-consoles loglevel=0 vt.global_cursor_default=0 logo.nologo systemd.unit=multi-user.target; do if ! grep -qw -- "$flag" "$CMDLINE"; then sed -i "s|\$| $flag|" "$CMDLINE" fi