Skip to content

Fix VNC server connection from Remmina in Docker image - #89

Open
chewcw wants to merge 1 commit into
serhmarch:mainfrom
chewcw:fix/dockerfile-vnc-connect
Open

chewcw wants to merge 1 commit into
serhmarch:mainfrom
chewcw:fix/dockerfile-vnc-connect

Conversation

@chewcw

@chewcw chewcw commented Oct 11, 2026

Copy link
Copy Markdown

Summary

Fix the VNC connection failure ("VNC server closed the connection") when Remmina connects to the Docker image.

Changes

supervisord.conf (novnc/websockify)

  • Removed --cert=/home/ubuntu/novnc.pem . The file and /home/ubuntu/ user don't exist in the container. It was unused.
  • Fixed websockify command syntax. websockify 0.10.0 does not support --target-host or --target-port . It uses positional args.
  • Before: websockify --web=... --cert=... 6080 localhost:5900
  • After: websockify --web=... localhost:6080 localhost:5900

supervisord.conf (server/client binary paths)

  • The CMakeLists.txt sets config-specific output dirs only for multi-config generators (VS/Xcode). On Linux with Makefiles and CMAKE_BUILD_TYPE , binaries land directly in CMAKE_BINARY_DIR ( /app/bin/ ).
  • Fixed the binary names to what CMake actually produces: mbserver / mbclient , not server / client .
  • Paths changed from /app/bin/Release/... to /app/bin/mbserver and /app/bin/mbclient .

Dockerfile (EXPOSE)

  • Added EXPOSE 5900 so Remmina can reach x11vnc directly. Before this, only 6080 was exposed. That port is the websockify WebSocket proxy. Remmina sends raw VNC protocol to it and gets "VNC server closed the connection".

Validation

  • docker build succeeds. Image tagged chewcw/modbus-tools .
  • All 6 supervisord programs (Xvfb, x11vnc, fluxbox, novnc, server, client) enter RUNNING state.
  • x11vnc on host port 5900 responds with RFB 003.008 ServerInit. Remmina can connect directly to localhost:5900 .
  • noVNC web UI on port 6080 serves /vnc.html (HTTP 200).

- Fix websockify command: remove nonexistent --cert path and unsupported
  --target-host/--target-port options
- Fix server/client binary paths: use correct names (mbserver/mbclient)
- EXPOSE 5900 so Remmina or other vnc client can connect directly to
  x11vnc
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