Fix kiosk mode

This commit is contained in:
Audiobuzz
2026-06-17 13:20:52 +00:00
parent fd84ba4180
commit 4b0e0135b3
5 changed files with 111 additions and 55 deletions
+14 -10
View File
@@ -1,5 +1,5 @@
[Unit]
Description=Wayland kiosk (weston kiosk-shell + Chromium)
Description=Wayland kiosk (weston desktop-shell + Chromium)
Documentation=man:weston(1) man:weston.ini(5)
# Take over tty1 from the login getty and start after the network is up (the
# kiosk loads a URL). plymouth-quit lets the splash hand off cleanly.
@@ -10,10 +10,15 @@ Conflicts=getty@tty1.service
[Service]
Type=simple
User=kiosk
# A real PAM login session on tty1 so logind assigns seat0 — cage/wlroots needs
# a seat for DRM master + libinput. (PAMName runs account/session, not auth, so
# the passwordless kiosk user is fine.)
# A real PAM login session on tty1 so logind assigns seat0 — weston needs a seat
# for DRM master + libinput. (PAMName runs account/session, not auth, so the
# passwordless kiosk user is fine.) XDG_SEAT/XDG_VTNR are set into the PAM
# environment before pam_open_session, so pam_systemd registers the session on
# seat0/vt1 — WITHOUT them logind's auto-derivation failed and weston died with
# "logind: failed to get session seat" -> "failed to create compositor backend".
PAMName=login
Environment=XDG_SEAT=seat0
Environment=XDG_VTNR=1
TTYPath=/dev/tty1
TTYReset=yes
TTYVHangup=yes
@@ -24,12 +29,11 @@ StandardError=journal
UtmpIdentifier=tty1
UtmpMode=user
EnvironmentFile=/etc/kiosk/kiosk.env
# weston with kiosk-shell (every app fullscreen). --use-pixman = software
# rendering for VMs/no-GPU. weston.ini's [autolaunch] runs /usr/local/bin/
# kiosk-session (Chromium) and, with watch=true, weston exits if it dies — so
# Restart=always relaunches the whole stack. cage (the original choice) isn't
# packaged for EL9; weston kiosk-shell is the minimal EL9-available equivalent.
ExecStart=/usr/bin/weston --use-pixman --config=/etc/xdg/weston/weston.ini
# kiosk-session launches weston (foreground, owns the seat) + Chromium. weston
# 8.0 (EPEL 9) lacks kiosk-shell.so/[autolaunch], so the wrapper does what those
# would have — see kiosk-session and weston.ini. If weston dies, Restart=always
# relaunches the whole stack; a Chromium-only crash is handled inside the wrapper.
ExecStart=/usr/local/bin/kiosk-session
Restart=always
RestartSec=2