Running status.sh in the first seconds after a reboot (before
/run/user/$UID exists / the lingering user manager is reachable), or as
the wrong user without a session bus, made every `systemctl --user` call
fail with "Failed to connect to bus". The Service check read that the
same as "unit doesn't exist" and printed a scary "no sunshine user unit
found" for a perfectly healthy, auto-starting install.
Probe the user manager once up front; if the bus is unreachable, say so
explicitly (and point at 'ss -tulnp | grep 47990' to verify Sunshine
independently) instead of cascading into false negatives.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bare Openbox rendered only a blank slate root — usable but not the
desktop wanted. Make the X11/NVENC capture path render a full GNOME
session by default, with Openbox available via HEADLESS_DESKTOP=openbox
for minimal/low-power hosts.
- files/headless-desktop-gnome.service: full Ubuntu GNOME session forced
onto the X11 path (XDG_SESSION_TYPE=x11, no dbus-run-session so it
shares the systemd user bus). Renamed the Openbox unit to
headless-desktop-openbox.service.
- lib/headless.sh: HEADLESS_DESKTOP (default gnome) selects the unit
template + the packages to install (gnome-session/gnome-shell vs
openbox/xsetroot).
- install.sh: step message + usage document HEADLESS_DESKTOP.
- status.sh: the :0 desktop check now reports which desktop is running
(reads _NET_WM_NAME off the supporting-wm-check window, e.g.
"GNOME Shell").
- docs: TROUBLESHOOTING §13 + FOLLOWUPS P3 updated for the GNOME default
and the openbox toggle.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A Moonlight client connecting to the x11-backend host got a black screen
even though pairing, NVENC, and input injection all worked: the headless
Xorg on :0 had no window manager rendering on it, so capture=x11 grabbed
an empty black root window. (The wlr/kms backends don't hit this — their
capture source renders for itself.)
This was a hand-built path with nothing in the repo to reproduce the
desktop piece. Now:
- files/headless-desktop.service: Openbox session on :0, bound to
xorg-headless.service, enabled via default.target for lingering boots,
with a best-effort xsetroot so the desktop is visibly non-black.
- lib/headless.sh: capture_backend_is_x11 + install_headless_desktop
(idempotent; pulls openbox/xsetroot via the distro dispatch).
- install.sh: installs the desktop unit when capture=x11 is detected.
- status.sh: x11 branch now FAILs if no window manager is on :0 instead
of only checking the X server answers — the gap that hid this failure.
- docs: TROUBLESHOOTING §13 black-screen lesson; FOLLOWUPS P3 updated.
Part of the P3 x11-backend work; --backend flag, config.sh x11 variant,
and xorg-headless templates remain outstanding.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>