fix(vnc): maximize browser window with a window manager (no more black border)#4914
Open
payne0420 wants to merge 1 commit into
Open
fix(vnc): maximize browser window with a window manager (no more black border)#4914payne0420 wants to merge 1 commit into
payne0420 wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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— addmatchbox-window-manager(tiny, kiosk-style, auto-maximizes top-level windows; pulled in by the existinginstall-plugin-deps.shonly when the VNC plugin is enabled).plugins/vnc/vnc-watcher.sh— start the WM on the detected display alongsidex11vnc(-use_titlebar no -use_cursor no→ borderless), track its PID, and restart it when the display changes. Guarded bycommand -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/windowvalues 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:
Navigatorwindow at1536×796+0+0on a1920×1080display → black border.Navigatorwindow at1920×1080+0+0→ fills the display, no black border.Relationship to #4781
Complementary to #4781 (re-attach
x11vncafter 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