GRI-2099: client install logs a screen account in at boot (auto-login, no password) #234

Merged
vivy merged 3 commits from feature/GRI-2099-kiosk-autologin into dev 2026-11-15 18:49:22 +00:00
Member

Closes #232 (board GRI-2099).

After a power cut a screen stood at the GDM login page, and the player only starts in a desktop session. install.sh client now sets the device up to log in by itself:

  • Screen account scryglass (or --kiosk-user NAME / SCRYGLASS_KIOSK_USER), created when missing, no admin group. An existing account with sudo, or a system account (uid < 1000), is refused.
  • No password (passwd -d), per GRI-2051. --kiosk-password-keep leaves the password alone and sets only the auto-login.
  • GDM auto-login: AutomaticLoginEnable=true, AutomaticLogin=<user> in [daemon] of /etc/gdm3/custom.conf (Ubuntu) or daemon.conf (Debian). Only those two keys change. The original is kept once as <file>.before-scryglass.
  • No lock, blanking or idle suspend for that account only: its own dconf profile with locked keys, handed to that account (and no other) by a systemd user-environment generator. GNOME's first-login wizard is skipped.
  • Safety: it stops before the build when sshd's effective config, or any PermitEmptyPasswords line (Match blocks included), says yes.
  • Upgrade: settings are recorded in /etc/grimoirix-signage/install.toml. An upgrade never re-creates the account, never changes an existing password, and keeps an auto-login that was already set to something else (another user, or turned off by hand). --no-kiosk is remembered too.
  • No GDM (LightDM on Raspberry Pi OS): nothing is set up, and the installer says so.
  • Uninstall keeps the account and prints how to undo it.

Tests: scripts/tests/install-client-kiosk-test.sh, 62 assertions, no root needed. It covers the custom.conf edit (keys set, all other lines kept, second run byte-identical), the plan for install/upgrade/reinstall, the refusals, precedence (flag > env > install.toml > default), and the whole step run twice on a private root (second run writes nothing). It runs in the CI installer job and in local-gates.sh. local-gates.sh --frontend-only passed locally; no Rust changed.

Not yet measured: the real reboot on a device. This host has no root and no container, and I have no access to the test client 10.0.0.188. Done-when item 1 needs somebody who has it to run install.sh client and then reboot.

Closes #232 (board GRI-2099). After a power cut a screen stood at the GDM login page, and the player only starts in a desktop session. `install.sh client` now sets the device up to log in by itself: - **Screen account** `scryglass` (or `--kiosk-user NAME` / `SCRYGLASS_KIOSK_USER`), created when missing, no admin group. An existing account with sudo, or a system account (uid < 1000), is refused. - **No password** (`passwd -d`), per GRI-2051. `--kiosk-password-keep` leaves the password alone and sets only the auto-login. - **GDM auto-login**: `AutomaticLoginEnable=true`, `AutomaticLogin=<user>` in `[daemon]` of `/etc/gdm3/custom.conf` (Ubuntu) or `daemon.conf` (Debian). Only those two keys change. The original is kept once as `<file>.before-scryglass`. - **No lock, blanking or idle suspend** for that account only: its own dconf profile with **locked** keys, handed to that account (and no other) by a systemd user-environment generator. GNOME's first-login wizard is skipped. - **Safety**: it stops before the build when sshd's effective config, or any `PermitEmptyPasswords` line (Match blocks included), says `yes`. - **Upgrade**: settings are recorded in `/etc/grimoirix-signage/install.toml`. An upgrade never re-creates the account, never changes an existing password, and keeps an auto-login that was already set to something else (another user, or turned off by hand). `--no-kiosk` is remembered too. - No GDM (LightDM on Raspberry Pi OS): nothing is set up, and the installer says so. - Uninstall keeps the account and prints how to undo it. **Tests**: `scripts/tests/install-client-kiosk-test.sh`, 62 assertions, no root needed. It covers the custom.conf edit (keys set, all other lines kept, second run byte-identical), the plan for install/upgrade/reinstall, the refusals, precedence (flag > env > install.toml > default), and the whole step run twice on a private root (second run writes nothing). It runs in the CI `installer` job and in `local-gates.sh`. `local-gates.sh --frontend-only` passed locally; no Rust changed. **Not yet measured**: the real reboot on a device. This host has no root and no container, and I have no access to the test client 10.0.0.188. Done-when item 1 needs somebody who has it to run `install.sh client` and then reboot.
GRI-2099: client install logs a screen account in at boot, so a screen shows the player after a reboot
All checks were successful
CI / the pre-push hook (pull_request) Successful in 4s
CI / cargo fmt (pull_request) Successful in 3s
CI / install.sh client upgrade (pull_request) Successful in 7s
CI / cargo deny (pull_request) Successful in 15s
CI / cargo deny advisories (pull_request) Successful in 15s
CI / repository boundary (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 1m23s
CI / frontend-web (pull_request) Successful in 1m10s
CI / cargo test (pull_request) Successful in 2m36s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 2s
616ae9b5f6
install.sh client now makes a screen account (default scryglass, no admin
rights), removes its password (GRI-2051), sets GDM's AutomaticLoginEnable and
AutomaticLogin and nothing else, and gives that account a locked dconf profile
with no screen lock, blanking or idle suspend. It stops before the build when
sshd allows empty passwords, or when the named account has sudo or is a
system account. --kiosk-user, --kiosk-password-keep and --no-kiosk (and their
SCRYGLASS_* variables) are recorded in /etc/grimoirix-signage/install.toml,
so an upgrade keeps them; an upgrade never re-creates the account, never
touches an existing password, and keeps an auto-login set to something else.

scripts/tests/install-client-kiosk-test.sh measures the custom.conf edit
(keys set, other lines kept, a second run changes nothing), the plan and its
refusals, and the whole step twice on a private root. Run by CI and by
local-gates.sh.
Merge branch 'dev' into feature/GRI-2099-kiosk-autologin
All checks were successful
CI / the pre-push hook (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 11s
CI / cargo fmt (pull_request) Successful in 6s
CI / cargo deny (pull_request) Successful in 23s
CI / cargo deny advisories (pull_request) Successful in 23s
CI / cargo clippy (pull_request) Successful in 1m38s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m5s
CI / cargo test (pull_request) Successful in 3m37s
CI / CI (pull_request) Successful in 2s
CI / Notify gate failed (pull_request) Has been skipped
daa9f73aa3
Owner

Review (Vivy, GRI-2099 / GRI-2110): approved. Checked: refusals come before the build (system uid, sudo/admin member, sshd PermitEmptyPasswords yes incl. sshd_config.d and Match blocks); GDM edit keeps the rest of the file and saves .before-scryglass; upgrade keeps an auto-login someone set by hand; dconf keys are locked and scoped to the screen account only. No hard-coded paths: SCRYGLASS_GDM_CONF overrides.

One behaviour to know, and it is tested on purpose: upgrade client on a device installed before this change creates the passwordless screen account and turns on auto-login. That follows from GRI-2051, but it is a change on existing screens at the next upgrade, so it belongs in the release notes. Raspberry Pi OS (LightDM) gets the nogdm message and no auto-login.

Branch updated from dev; merging when CI is green.

Review (Vivy, GRI-2099 / GRI-2110): **approved.** Checked: refusals come before the build (system uid, sudo/admin member, sshd `PermitEmptyPasswords yes` incl. `sshd_config.d` and Match blocks); GDM edit keeps the rest of the file and saves `.before-scryglass`; upgrade keeps an auto-login someone set by hand; dconf keys are locked and scoped to the screen account only. No hard-coded paths: `SCRYGLASS_GDM_CONF` overrides. One behaviour to know, and it is tested on purpose: **`upgrade client` on a device installed before this change creates the passwordless screen account and turns on auto-login.** That follows from GRI-2051, but it is a change on existing screens at the next upgrade, so it belongs in the release notes. Raspberry Pi OS (LightDM) gets the `nogdm` message and no auto-login. Branch updated from `dev`; merging when CI is green.
Merge branch 'dev' into feature/GRI-2099-kiosk-autologin
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 14s
CI / cargo fmt (pull_request) Successful in 8s
CI / cargo deny (pull_request) Successful in 21s
CI / cargo clippy (pull_request) Successful in 1m33s
CI / cargo deny advisories (pull_request) Successful in 24s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m34s
CI / cargo test (pull_request) Successful in 4m34s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 2s
a07286e392
vivy merged commit 0cb7e82602 into dev 2026-11-15 18:49:22 +00:00
vivy deleted branch feature/GRI-2099-kiosk-autologin 2026-11-15 18:49:23 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!234
No description provided.