From 91d905f45affa2d46853805d8c40045ea2d7ba0f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 16 Jun 2026 18:04:36 +0000 Subject: [PATCH 1/2] Fix LightDM autologin on Ubuntu 22.04+ (new hardware) [SeatDefaults] is silently ignored by LightDM on newer Ubuntu versions. Replace with [Seat:*] which is the correct section name for Ubuntu 22.04+. Also add the kiosk user to the autologin group, which newer Ubuntu requires for passwordless autologin to work. Without these fixes, LightDM shows the login screen instead of auto-logging in and launching the kiosk app. https://claude.ai/code/session_01VQ13Fwq4MXxwThLfCXBeGr --- ubuntu-based-kiosk-v1.0.3.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ubuntu-based-kiosk-v1.0.3.sh b/ubuntu-based-kiosk-v1.0.3.sh index cb7e882..3c65b77 100644 --- a/ubuntu-based-kiosk-v1.0.3.sh +++ b/ubuntu-based-kiosk-v1.0.3.sh @@ -7558,8 +7558,12 @@ EOF echo "[19/27] Configuring autologin..." sudo mkdir -p /etc/lightdm/lightdm.conf.d + # [Seat:*] is required on Ubuntu 22.04+ ([SeatDefaults] is ignored on newer LightDM) + # Also add kiosk user to the autologin group required by newer Ubuntu + sudo groupadd -f autologin + sudo usermod -aG autologin "$KIOSK_USER" sudo tee /etc/lightdm/lightdm.conf.d/10-kiosk.conf > /dev/null < Date: Tue, 16 Jun 2026 18:15:05 +0000 Subject: [PATCH 2/2] Fix LightDM autologin on fresh server installs (nopasswdlogin group + missing config) Two bugs caused the login screen to appear on new Ubuntu 24.04 server hardware: 1. Ubuntu 24.04's PAM config checks 'user ingroup nopasswdlogin', not 'autologin'. Add kiosk user to nopasswdlogin group (and autologin for older versions). 2. The upgrade path never wrote /etc/lightdm/lightdm.conf.d/10-kiosk.conf, so on new hardware running through upgrade the file simply didn't exist. Refactor: extract configure_lightdm_autologin() shared helper called from both fresh install (step 19/27) and upgrade, so both paths are consistent. Also use [Seat:*] instead of [SeatDefaults] for forward compatibility. https://claude.ai/code/session_01VQ13Fwq4MXxwThLfCXBeGr --- ubuntu-based-kiosk-v1.0.3.sh | 44 ++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/ubuntu-based-kiosk-v1.0.3.sh b/ubuntu-based-kiosk-v1.0.3.sh index 3c65b77..9b0c489 100644 --- a/ubuntu-based-kiosk-v1.0.3.sh +++ b/ubuntu-based-kiosk-v1.0.3.sh @@ -7557,23 +7557,7 @@ EndSection EOF echo "[19/27] Configuring autologin..." - sudo mkdir -p /etc/lightdm/lightdm.conf.d - # [Seat:*] is required on Ubuntu 22.04+ ([SeatDefaults] is ignored on newer LightDM) - # Also add kiosk user to the autologin group required by newer Ubuntu - sudo groupadd -f autologin - sudo usermod -aG autologin "$KIOSK_USER" - sudo tee /etc/lightdm/lightdm.conf.d/10-kiosk.conf > /dev/null < /dev/null <