PyVirtualDisplay
PyVirtualDisplay copied to clipboard
"Not a valid VNC server" when running VNC example
Hi, I'm hitting "Not a valid VNC server" when attempting to run a basic VNC server in Docker.
VNCServer (containerized): Docker version 20.10.12, build 20.10.12-0ubuntu4 python:3.10.4-slim-bullseye
Local machine: Ubuntu 22.04 TightVNC Viewer version 1.3.10
Container:
sudo apt-get install xvfb xserver-xephyr tigervnc-standalone-server x11-utils gnumeric
pip install pyvirtualdisplay pillow EasyProcess
...
>>> from easyprocess import EasyProcess
>>> from pyvirtualdisplay import Display
>>> with Display(backend="xvnc", size=(100, 60), rfbport=5904) as disp:
>>> with Display(backend="xvnc", size=(100, 60), rfbport=5900) as disp:
... with EasyProcess(["xmessage", "hello"]) as proc:
... proc.wait()
...
Local machine
$ xvncviewer localhost:5900
Not a valid VNC server
README: "pyvirtualdisplay is a python wrapper for Xvfb, Xephyr and Xvnc"
You have a problem with xvnc and docker, pyvirtualdisplay is just a wrapper. Try to fix it by starting xvnc directly without Python.
You may want to search for "xvnc Not a valid VNC server" https://www.google.com/search?q=%22Not+a+valid+VNC+server%22+xvnc
Thanks, @ponty ... Sorry for the noise.