mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 22:26:33 +00:00
Replace the user-mode kiosk service with a system unit that runs cage (single-app Wayland compositor) on tty1 as a dedicated unprivileged user. No desktop, no display manager, auto-restart on crash via Restart=always. setup-pi-kiosk.sh provisions the user, installs cage + seatd, disables any display manager, points default.target at multi-user, drops the PAM stack, and enables the service. Idempotent. Screen wake "auto-login": with no DM and no lockscreen, DPMS-driven sleep just turns the panel back on — the kiosk process is already running.
38 lines
1 KiB
Desktop File
38 lines
1 KiB
Desktop File
[Unit]
|
|
Description=BetterFrame Kiosk (cage + betterframe-kiosk)
|
|
Documentation=https://github.com/BetterCorp/BetterFrame
|
|
After=systemd-user-sessions.service plymouth-quit-wait.service network-online.target seatd.service
|
|
Wants=network-online.target
|
|
Conflicts=getty@tty1.service
|
|
After=getty@tty1.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=bfkiosk
|
|
Group=bfkiosk
|
|
SupplementaryGroups=video render input audio seat
|
|
PAMName=cage
|
|
TTYPath=/dev/tty1
|
|
TTYReset=yes
|
|
TTYVHangup=yes
|
|
TTYVTDisallocate=yes
|
|
StandardInput=tty-fail
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
UtmpIdentifier=tty1
|
|
UtmpMode=user
|
|
WorkingDirectory=/home/bfkiosk
|
|
EnvironmentFile=-/etc/default/betterframe-kiosk
|
|
Environment=XDG_SESSION_TYPE=wayland
|
|
Environment=XDG_SESSION_CLASS=user
|
|
Environment=GST_DEBUG=1
|
|
Environment=BETTERFRAME_SERVER=http://localhost
|
|
ExecStart=/usr/bin/cage -s -- /opt/betterframe/kiosk/betterframe-kiosk
|
|
Restart=always
|
|
RestartSec=2
|
|
# After 10 fast restarts, back off for 30s so a broken binary doesn't burn the CPU.
|
|
StartLimitIntervalSec=60
|
|
StartLimitBurst=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|