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:
@@ -249,9 +249,12 @@ TROUBLESHOOTING.md §13.
|
||||
|
||||
**Done so far**: the *desktop* piece of the x11 backend is now reproducible.
|
||||
`install.sh` detects `capture = x11` (via `capture_backend_is_x11`) and installs
|
||||
+ enables `files/headless-desktop.service` (Openbox on `:0`) so the headless
|
||||
Xorg has a window manager to render — without it, capture is a black screen.
|
||||
`status.sh` gained a matching check (FAIL if no WM on `:0`). Still outstanding:
|
||||
+ enables `headless-desktop.service` so the headless Xorg has a desktop to
|
||||
render — without it, capture is a black screen. Desktop is selectable via
|
||||
`HEADLESS_DESKTOP`: `gnome` (default — full Ubuntu GNOME session, X11 path) or
|
||||
`openbox` (lightweight bare WM); each ships as its own unit template
|
||||
(`files/headless-desktop-{gnome,openbox}.service`). `status.sh` gained a matching
|
||||
check (FAIL if no desktop on `:0`, and reports which one). Still outstanding:
|
||||
the `--backend x11|wlr` flag/auto-detect, the `config.sh` x11 conf variant, and
|
||||
shipping the `xorg-headless.service` + `xorg-headless.conf` templates.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user