PyVirtualDisplay icon indicating copy to clipboard operation
PyVirtualDisplay copied to clipboard

"Not a valid VNC server" when running VNC example

Open rymurph20 opened this issue 2 years ago • 2 comments

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

rymurph20 avatar Jun 13 '22 16:06 rymurph20

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

ponty avatar Jun 14 '22 21:06 ponty

Thanks, @ponty ... Sorry for the noise.

rymurph20 avatar Jun 15 '22 18:06 rymurph20