Default the x11 headless desktop to GNOME (Openbox still opt-in)

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>
This commit is contained in:
2026-06-02 23:56:17 +00:00
parent 6fc34a2bd2
commit 84ddf8c1c6
7 changed files with 96 additions and 27 deletions

View File

@@ -490,12 +490,19 @@ DISPLAY=:0 xlsclients # only 'sunshine' = no WM/des
DISPLAY=:0 xprop -root _NET_SUPPORTING_WM_CHECK # 'not found' = no window manager
```
Fix: run a window manager on `:0`. The installer ships a `headless-desktop.service`
(Openbox) for exactly this and enables it whenever it detects `capture = x11`:
Fix: run a desktop on `:0`. The installer ships a `headless-desktop.service`
for exactly this and enables it whenever it detects `capture = x11`. It defaults
to a full **GNOME** session (`gnome-session --session=ubuntu`, forced to the X11
path); set `HEADLESS_DESKTOP=openbox` for a lightweight bare WM instead (lower
overhead, but no panel/launcher — right-click menu only). The unit forces
`XDG_SESSION_TYPE=x11` and does **not** wrap GNOME in `dbus-run-session` — GNOME
must share the systemd *user* bus the service already inherits.
```bash
systemctl --user enable --now headless-desktop.service
DISPLAY=:0 xprop -root _NET_SUPPORTING_WM_CHECK # now reports a 'window id'
# read the running desktop's name off that window:
DISPLAY=:0 xprop -id <id> _NET_WM_NAME # e.g. "GNOME Shell"
```
`status.sh` checks for this directly: with `capture = x11` it now FAILs if no