fix: give the live session user access to the console VT
Xorg failed to start with:
(EE) xf86OpenConsole: Cannot open virtual console 1 (Permission denied)
udev leaves console VTs as 620 root:tty — group tty has write-only, so
even a tty-group member can't open /dev/tty1 read+write (display managers
normally get this via logind seat ACLs, which a manually-started X
doesn't have). The session script now chowns the dedicated VT to
liveuser before starting X; the unit already Conflicts with getty@tty1 so
nothing else needs it.
This commit is contained in:
@@ -48,10 +48,15 @@ the live session with the installer in it.
|
||||
|
||||
`overlays/live/etc/systemd/system/arcline-installer.service` starts
|
||||
`arcline-installer-session` on boot. Modern Xorg (trixie 21.1.x) refuses to
|
||||
run as root, so the session script starts Xorg as the dedicated unprivileged
|
||||
`liveuser` account on vt1, grants root display access (`xhost
|
||||
+SI:localuser:root`), then runs the installer as root (it needs root for
|
||||
`deploy-disk.sh`). When the installer exits, X and the session end.
|
||||
run as root, so the session script:
|
||||
|
||||
1. hands the dedicated console VT to `liveuser` (`chown`, since udev leaves
|
||||
VTs 620 root:tty which isn't readable by the tty group),
|
||||
2. starts Xorg as the unprivileged `liveuser` on vt1,
|
||||
3. grants root display access (`xhost +SI:localuser:root`),
|
||||
4. runs the installer as root (it needs root for `deploy-disk.sh`).
|
||||
|
||||
When the installer exits, X and the session end.
|
||||
|
||||
## Manual run (for development / on a box without the ISO)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user