Skip to content

fix: Start Xvfb in server docker when GUI flag is used#873

Open
ruck314 wants to merge 2 commits intomainfrom
issues-871-dev
Open

fix: Start Xvfb in server docker when GUI flag is used#873
ruck314 wants to merge 2 commits intomainfrom
issues-871-dev

Conversation

@ruck314
Copy link
Copy Markdown
Contributor

@ruck314 ruck314 commented Apr 3, 2026

Summary

  • Install xvfb and x11-utils in the server Dockerfile
  • Auto-start Xvfb in start_server.sh when -g/--gui is passed and no working display is found
  • Prevents the Qt/XCB crash that aborts the server on startup with the GUI flag

Context

The rogue v6 update switched the GUI from pyrogue.gui (which supported both Qt and PyDM backends) to exclusively using pyrogue.pydm.runPyDM(). PyDM requires a working X display connection, and the server docker doesn't have one configured by default.

The fix is defensive: if X11 forwarding is properly set up (e.g., via docker-compose mounting /tmp/.X11-unix), it uses that. Otherwise, Xvfb provides a fallback virtual framebuffer so the server doesn't abort.

Closes #871

Test plan

  • Build server docker image and verify Xvfb packages are installed
  • Run server docker with -g flag and no DISPLAY — should start Xvfb automatically instead of crashing
  • Run server docker with -g flag and working X11 forwarding — should use existing display
  • Run server docker without -g flag — no Xvfb started, no change in behavior

Install Xvfb in the server Dockerfile and auto-start a virtual
framebuffer in start_server.sh when -g/--gui is passed and no
working display is found.  Prevents the Qt/XCB crash on startup.

Closes #871
@ruck314 ruck314 requested review from swh76 and tristpinsm as code owners April 3, 2026 15:44
@github-actions github-actions bot added the core Changes to the core code, which is used in the server application label Apr 3, 2026
Replace the fixed 2-second sleep with a poll loop that waits until
FileWriter.FrameCount reaches FrameRxStats.FrameCnt. This eliminates
the race condition where in-flight frames are lost when the FileWriter
is closed before the pipeline fully drains.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to the core code, which is used in the server application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server docker gui broken in rogue 6 releases

1 participant