run0: install via scripts/as-root, chandra-root for GUI apps as root, session refuses root
CI / test (push) Failing after 16s

- scripts/as-root runs a command as root with run0 (systemd PID 1 + run0 present), else sudo,
  doas or pkexec; resolves the program to an absolute path since run0 doesn't inherit PATH.
  The install-session recipes use it and pass install.py by absolute path.
- session/chandra-root (installed to /usr/local/bin): run a graphical app as root inside
  Chandra, passing WAYLAND_DISPLAY (absolute) and the Wayland toolkit variables through
  run0 --setenv (or sudo/doas/pkexec env).
- chandra-session: refuses to run as root (CHANDRA_ALLOW_ROOT=1 overrides), fills in HOME and
  XDG_RUNTIME_DIR when started without a login environment, logs when the logind session has
  no seat (run0 --user / su / ssh), and starts an installed polkit agent once the socket is up
  so run0/pkexec from the launcher can prompt (CHANDRA_POLKIT_AGENT picks one or 'none').
- install.py: checks for root before --remove too; installs chandra-root.
- docs/run0.md: invocations for installing, starting from a TTY, apps as root, polkit agents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hkq6Hq7AXG85g5HyJU
This commit is contained in:
Claude committed 2026-11-25 20:13:55 +00:00
1 parent f844ac66ff
commit 9c0a794c2d
7 files changed
+254 -8

No files matched your search

+4
View File
@@ -72,6 +72,10 @@ scripts/build.sh clock-binary # builds just that component
Screenshots: see the end of [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md).
Installing the login session (`just install-session`) asks for root through run0, else sudo/doas/pkexec;
for starting the desktop from a TTY and running apps as root inside it (`chandra-root`), see
[docs/run0.md](docs/run0.md).
## Layout
```