Skip to content

Release v0.13.2: Fix black Desktop screen after restart / Xorg launch (setsid) - #3

Merged
patattzel merged 1 commit into
mainfrom
fix/desktop-setsid-black-screen
Dec 2, 2026
Merged

patattzel merged 1 commit into
mainfrom
fix/desktop-setsid-black-screen

Conversation

@patattzel

Copy link
Copy Markdown
Owner

Summary

Fixes the solid-black Desktop screen (1024×640 · 30 fps) after restarting a Browser-VM and clicking ▶ Xorg:

  • Root cause: kwtty terminates the entire PTY process group when the launcher shell exits. sudo Xorg survived in its root context (leaving /dev/fb0 open with a pure black root window), while DISPLAY=:0 nohup sh ~/.xinitrc was killed immediately before xsetroot, tint2, xterm, and openbox could start.
  • Fix (src/web/desktop-keys.ts): Launch both Xorg and ~/.xinitrc detached in their own sessions via setsid ... </dev/null >/tmp/... 2>&1 & (verified live in Alpine unkernel), clean up stale openbox/tint2 processes before starting, wait up to 8s for /tmp/.X11-unix/X0, and include a fallback if ~/.xinitrc is missing.
  • Cleaner Browser-VM ▶ Xorg button (src/web/main.ts): Runs buildDesktopStartScript() via browserVms.exec() instead of spawning extra dead 🖥️ Xorg tabs in the tab bar, and surfaces clear status toasts.
  • Release metadata: Bumped to v0.13.2 (package.json, package-lock.json, CloudronManifest.json, CloudronVersions.json, openapi.ts, CHANGELOG.md, sw.js → kernbox-shell-v24).

Verification

  • Live Alpine unkernel test confirmed both sudo setsid and DISPLAY=:0 setsid survive both vm.spawn() and vm.exec() exit, and /dev/fb0 renders pixels cleanly with gpu: true.
  • npm run typecheck, npm run build, and npm test — 17/17 passed.

@patattzel
patattzel merged commit 9a54124 into main Dec 2, 2026
2 checks passed
@patattzel
patattzel deleted the fix/desktop-setsid-black-screen branch December 2, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant