Hello,
Using vncdotool from Python, on Debian Linux.
When vncdotool connection is made and screen refresh is requested, vncdotool hangs.
Python code:
from vncdotool import api as _vnc_api
self._client = _vnc_api.connect(server=server, password=password)
self._client.refreshScreen(incremental=False) # hangs here
vncdotool version used is 1.3.1.dev0
VNC server running is tigervnc, version 1.15.0+dfsg-2+b1. VNC server is launched using following command:
/usr/bin/vncserver -SecurityTypes VncAuth -alwaysshared -depth 24 -geometry 1600x1000 :1 -xstartup /usr/bin/icewm
(TLS encryption disabled to allow inspection of protocol exchange via wireshark. It operates the same way with TLS enabled).
This server already has a single VNC client connected, VNC client is connected using following command:
/usr/bin/xvncviewer -Shared
I'm using vncdotool to open a second connection.
This failure happens because tigervnc in such conditions sends some VNC Fence requests, and vncdotool does not recognize them and silently disconnects, while refreshScreen() call is left waiting forever.
To fix this I have added a very simple VNC fence support to vncdotool. It does fix this issue at least for me. I will send a PR. This implementation was produced with the help of AI, so please review it before merging. I have checked the code myself and it does look reasonable, but I do not have sufficient familiarity with vncdotool codebase to be sure.
Pull request here: #323
Please do not hesitate to contact me if would like some changes in the PR or if you need anything else.
Sincerely,
Teofilis Martisius
Hello,
Using vncdotool from Python, on Debian Linux.
When vncdotool connection is made and screen refresh is requested, vncdotool hangs.
Python code:
vncdotool version used is 1.3.1.dev0
VNC server running is tigervnc, version 1.15.0+dfsg-2+b1. VNC server is launched using following command:
/usr/bin/vncserver -SecurityTypes VncAuth -alwaysshared -depth 24 -geometry 1600x1000 :1 -xstartup /usr/bin/icewm(TLS encryption disabled to allow inspection of protocol exchange via wireshark. It operates the same way with TLS enabled).
This server already has a single VNC client connected, VNC client is connected using following command:
/usr/bin/xvncviewer -SharedI'm using vncdotool to open a second connection.
This failure happens because tigervnc in such conditions sends some VNC Fence requests, and vncdotool does not recognize them and silently disconnects, while refreshScreen() call is left waiting forever.
To fix this I have added a very simple VNC fence support to vncdotool. It does fix this issue at least for me. I will send a PR. This implementation was produced with the help of AI, so please review it before merging. I have checked the code myself and it does look reasonable, but I do not have sufficient familiarity with vncdotool codebase to be sure.
Pull request here: #323
Please do not hesitate to contact me if would like some changes in the PR or if you need anything else.
Sincerely,
Teofilis Martisius