fix(kiosk): stop GDM covering the wall with a greeter after auto-login

Auto-login succeeded and the wall kept streaming, but about ten seconds
after the kiosk session came up GDM autospawned a greeter on the same GPU
and a login screen covered it. gnome-kiosk ships X-GDM-SessionRegisters=false,
so nothing ever registers and GDM concludes the display is still free — which
is why every remote check (loginctl, the mirror roster) stayed green while
the physical screen showed a password prompt.

Override that session file with the flag set to true, keeping the file name
and session id identical: inventing an id makes GDM quietly fall back to the
plain GNOME session, top bar and all.

Add a per-minute guard that reclaims the foreground VT, because this class
of failure is invisible from the outside, and have the checker assert both
the foreground VT and the greeter-session count. That count had a silent
false green: journalctl has no --no-legend, so the check read an empty
stream and passed unconditionally.

Also keep a copy of the payload in /usr/local/share/mirror-kiosk. /tmp is
cleared at every boot, which deletes the checker just after the one event
you are most likely to want to re-run it for.

Verified on the reference client: a cold boot now creates no greeter session
at all, the kiosk compositor and Firefox come up undisturbed, and a console
stolen with chvt is taken back within a minute.

LLM-Generated: true
This commit is contained in:
2026-11-01 19:46:17 -05:00
parent 32c6bc272b
commit 7d4bcf7e23
8 changed files with 254 additions and 20 deletions
+7 -6
View File
@@ -116,15 +116,16 @@ session, auto-logged in as `kiosk`, with Firefox in `--kiosk` mode pointed at
no monitor:
```bash
scp -r docs/kiosk-silverblue client:/tmp/ && ssh client \
'cd /tmp/kiosk-silverblue && sudo sh install-kiosk.sh && sudo systemctl restart gdm'
ssh client 'cd /tmp/kiosk-silverblue && sudo sh check-kiosk.sh'
scp -r docs/kiosk-silverblue client:/var/tmp/ && ssh client \
'cd /var/tmp/kiosk-silverblue && sudo sh install-kiosk.sh && sudo systemctl restart gdm'
ssh client 'sudo sh /usr/local/share/mirror-kiosk/check-kiosk.sh'
```
Because nobody is standing at the machine, every claim about it is verified from
the outside: `loginctl` for the session, the server's `/api/streams` for the
viewer, the sharer's own peer state for the media, and a probe page for the
rendered resolution. The runbook records why each file lives where it does on an
the outside: `loginctl` for the session, the foreground VT for "is the wall
actually on screen", the server's `/api/streams` for the viewer, the sharer's own
peer state for the media, and a probe page for the rendered resolution. The
runbook records why each file lives where it does on an
otherwise read-only OS.
## Development