Skip to content

Let SELKIES_DEBUG show the desktop session's output - #188

Open
junkerderprovinz wants to merge 1 commit into
linuxserver:masterfrom
junkerderprovinz:fix/selkies-debug-shows-session-output
Open

junkerderprovinz wants to merge 1 commit into
linuxserver:masterfrom
junkerderprovinz:fix/selkies-debug-shows-session-output

Conversation

@junkerderprovinz

@junkerderprovinz junkerderprovinz commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #176.

Following up on the approach I described in the issue. svc-de/run opens the destination while it is still root, and both entrypoints inherit that descriptor across s6-setuidgid. So abc never opens /dev/stdout itself, which was the blocker on the earlier attempt, and the conditional sits in one place rather than in each session script.

Verified the inheritance holds:

opened by: root
inherited write by: nobody

while the same user opening /dev/stdout directly still gets Permission denied.

SELKIES_DEBUG already drives the selkies server's own debug logging, and this extends it to the session output. With it off, behaviour is unchanged.

The session scripts sent openbox and labwc output to /dev/null
unconditionally, so autostart failures never reached the container log.
SELKIES_DEBUG only affected the selkies server's own logging.

svc-de/run opens fd 3 while it is still root, pointing at stdout when
SELKIES_DEBUG is true and at /dev/null otherwise, and the session commands
write to it. abc inherits the descriptor across s6-setuidgid and never opens
/dev/stdout itself. The scripts fall back to /dev/null when fd 3 is missing,
so running them without svc-de/run behaves as before.
@junkerderprovinz
junkerderprovinz force-pushed the fix/selkies-debug-shows-session-output branch from dbb1cdd to 54cc91e Compare September 23, 2026 21:01
@junkerderprovinz

Copy link
Copy Markdown
Contributor Author

Rebased onto the v2 master. The v2 startwm.sh and startwm_wayland.sh still send openbox and labwc to /dev/null unconditionally, so SELKIES_DEBUG cannot show why the session or an autostart entry failed. The session commands now write to fd 3, which svc-de/run opens as root and points at stdout only when SELKIES_DEBUG is true, so with it off the output is the same as today, selkies-desktop included. The SELKIES_DEBUG check lives only in svc-de/run, abc never opens /dev/stdout itself, and the scripts fall back to /dev/null if fd 3 is missing. The same commit applies cleanly to the other v2 flavor branches if you want it there too.

@thelamer

Copy link
Copy Markdown
Member

Yeah I will get to stuff after downstream is settled we rebuild every week so this will land eventually I need to test if shell redirection like this to a 3rd tty has any effect on stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[BUG] startwm.sh silences all openbox-session output, hiding autostart logs

3 participants