Skip to content

fix(vnc): maximize browser window with a window manager (no more black border)#4914

Open
payne0420 wants to merge 1 commit into
jo-inc:masterfrom
payne0420:vnc-window-manager
Open

fix(vnc): maximize browser window with a window manager (no more black border)#4914
payne0420 wants to merge 1 commit into
jo-inc:masterfrom
payne0420:vnc-window-manager

Conversation

@payne0420

Copy link
Copy Markdown
Contributor

Summary

The VNC plugin runs Camoufox on an Xvfb display with no window manager, so Firefox windows stay at whatever size Camoufox spawns them (sized for fingerprinting, e.g. 1536×796) and are never maximized to the display. In noVNC this shows up as the browser in the top-left with a black border filling the rest of the Xvfb root.

Raising the page viewport doesn't help — that controls content size, not the OS window's size/placement on the display. The fix is a window manager that maximizes the window.

What changed

  • plugins/vnc/apt.txt — add matchbox-window-manager (tiny, kiosk-style, auto-maximizes top-level windows; pulled in by the existing install-plugin-deps.sh only when the VNC plugin is enabled).
  • plugins/vnc/vnc-watcher.sh — start the WM on the detected display alongside x11vnc (-use_titlebar no -use_cursor no → borderless), track its PID, and restart it when the display changes. Guarded by command -v, so it's a no-op if the package isn't present.

16 lines added, no behaviour change when the VNC plugin is disabled.

Anti-detection note

This does not affect fingerprinting: Camoufox spoofs the JS-level screen/window values independently of the real OS window, so maximizing the OS window only changes what VNC renders, not what the page sees.

Verification

Built the image with the VNC plugin enabled and opened a tab:

  • Before: Navigator window at 1536×796+0+0 on a 1920×1080 display → black border.
  • After: matchbox running, Navigator window at 1920×1080+0+0 → fills the display, no black border.

Relationship to #4781

Complementary to #4781 (re-attach x11vnc after browser idle shutdown) — different concern, different part of the loop, no overlap. This PR is intentionally scoped to just the window-manager fix and does not include that change.

🤖 Generated with Claude Code

…k border)

The VNC plugin runs Camoufox on an Xvfb display with no window manager, so
Firefox windows stay at whatever size Camoufox spawns them (sized for
fingerprinting, e.g. 1536x796) and are never maximized to the display. In
noVNC this shows as the browser sitting in the top-left with a black border
filling the rest of the Xvfb root. Raising the page viewport doesn't help —
that controls content size, not the OS window placement on the display.

This adds matchbox-window-manager (tiny, kiosk-style, auto-maximizes top-level
windows) and starts it on the detected display alongside x11vnc, tied to the
same lifecycle (restarted on display change). The browser window now fills the
full Xvfb root, eliminating the black border.

- plugins/vnc/apt.txt: add matchbox-window-manager
- plugins/vnc/vnc-watcher.sh: start the WM on the active display (borderless,
  no cursor), track its PID, and restart it when the display changes

Anti-detection is unaffected: Camoufox spoofs the JS-level screen/window
values independently of the real OS window, so maximizing the OS window only
changes what VNC renders, not the fingerprint.

Verified: with a tab open, the Navigator window went from 1536x796 (black
border) to 1920x1080+0+0, filling a 1920x1080 display.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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