fix(vnc): detect Xvfb via /tmp/.X11-unix socket, not ps regex - #8070
Closed
luxles wants to merge 1 commit into
Closed
fix(vnc): detect Xvfb via /tmp/.X11-unix socket, not ps regex#8070luxles wants to merge 1 commit into
luxles wants to merge 1 commit into
Conversation
The watcher detects the Xvfb display via: FOUND=$(ps -eo args= | awk '/\\/Xvfb :[0-9]+/ ...') This regex requires a literal ':N' token in Xvfb's ps args. But Camoufox launches Xvfb with '-displayfd 3', where the display number is NOT present as a ':N' token in ps args (it is allocated by Xvfb and exposed only as the /tmp/.X11-unix/X0 socket). Switch detection to scanning /tmp/.X11-unix/X* sockets (with [ -S ] guard). Works for both :N literal launches and -displayfd N launches.
This was referenced Jul 17, 2026
skyfallsin
added a commit
that referenced
this pull request
Jul 19, 2026
Incorporates the VNC attachment and recovery work proposed in #4781, #5243, #6549, and #8070 while preserving per-server process ownership. Co-authored-by: Doud-FR <59610009+Doud-FR@users.noreply.github.com> Co-authored-by: paranoidi <504877+paranoidi@users.noreply.github.com> Co-authored-by: Omar Usman <19397228+modanq@users.noreply.github.com> Co-authored-by: luxles <291718194+luxles@users.noreply.github.com>
Contributor
|
Thank you — the Included via commit 50b5031 with co-author credit. |
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.
Bug
plugins/vnc/vnc-watcher.shdetects the Camoufox Xvfb display with:This regex requires the literal
:Ntoken (e.g.Xvfb :0 ...) in Xvfb'spsargs.But Camoufox launches Xvfb with
-displayfd 3(e.g.Xvfb -displayfd 3 -screen 0 1920x1080x24 ...). In that mode the display number is not present as a literal:Ntoken inpsargs — it is allocated by Xvfb and exposed only as the/tmp/.X11-unix/X0socket.→ With
-displayfd 3,FOUNDis always empty → the watcher never launches x11vnc → port 5900 never listens, VNC stays black.Fix
Detect the display via the
/tmp/.X11-unix/X*socket (mode-independent — works for both:Nliteral launches and-displayfd Nlaunches):Equivalent result to the original regex (yields
:0), but also works when Xvfb is started with-displayfd 3.Verification
Xvfb -displayfd 3 -screen 0 1920x1080x24 ...VNC watcher started -- will attach x11vnc when Camoufox's Xvfb appears; 5900 never listens./tmp/.X11-unix/X0appears,FOUND=:0, x11vnc launches, 5900 listens, noVNC (6080) connects.Scope note (no overclaim)
This PR fixes only the display-detection regex not matching the
-displayfd 3launch mode.Note there is a separate, orthogonal issue: some locally-built
camofox-browser:135.0.1-x86_64images fail to start the browser at all in certain environments (noVNC missing from image, UBO addon download fails,cannot open display: [object Promise]= theawait VirtualDisplay.get()bug). That is a different root cause and is not addressed by this PR.Related
psregex; under-displayfd 3itsFOUNDis also empty, so its fix does not take effect. Suggest adopting socket detection there too once this merges.