sibson / vncdotool

A command line VNC client and python library
Other
451 stars 120 forks source link

Edition 11.0 is connected to VMware10 and why does it block the screenshot of the CaptureReGion? Is there any way to check? #265

Open jian-kuang opened 1 year ago

jian-kuang commented 1 year ago

Please include the following information:

vncdotool 1.1.0

vmware 10

The first screenshot is okay, the second screenshot appears blocking. The blocking time has continued.But with incremental = true, there will be no block. If you use incremental = true, how to ensure that the order of saving screenshots is increasing?

pmhahn commented 1 year ago

There is no version 11.0 of vncdotool: please provide that information.

Have you checked using vncdotool.client.VMWareFactory and/or vncdotool.client.VMWareClient as VMware already required some work-around in the past.

Running tcpdump or wireshark in parallel to capture the VNC session might provide some more inside.

jian-kuang commented 1 year ago

There is no version 11.0 of vncdotool: please provide that information.

Have you checked using vncdotool.client.VMWareFactory and/or vncdotool.client.VMWareClient as VMware already required some work-around in the past.

Running tcpdump or wireshark in parallel to capture the VNC session might provide some more inside.

Enter the wrong, vncdotool is version 1.1.0 I use the API call screenshot, read the source code, the API connection uses VNCDOTOOLFACTORY I haven't caught the TCP package

pmhahn commented 1 year ago

If you use the API can you try out the VMWareFactory just to see if that hack solves your problem:

import vncdtool.api
import vncdotool.client

with vncdotool.api.connect(…, factory_class=vncdotool.client.VMWareFactory) as api:
    api.screenshot(…)

incremental=True just tells the RFB/VNC protocol to do incremental updates of the screen, e.g. only the changed regions are updated. (this requires the implementation to internally save the screen content, so these updates can be applied to the previous content.))

With incremental=False you ask the server to send you the full screen each time, which requires much more network bandwidth. If you do not care about network bandwidth (for example because you're connection localhost or it's a high-speed internal network), using incremental=False should be okay.

What I currently do not know is how screenshot(…, incremental=True) handles the case where the (server) screen did not change: Basically the client ask the server to send updates, but if there is nothing to update — as nothing changed — how does the server signal the client that it will not send any update packets and that it is done.

jian-kuang commented 1 year ago

If you use the API can you try out the VMWareFactory just to see if that hack solves your problem:

import vncdtool.api
import vncdotool.client

with vncdotool.api.connect(…, factory_class=vncdotool.client.VMWareFactory) as api:
    api.screenshot(…)

incremental=True just tells the RFB/VNC protocol to do incremental updates of the screen, e.g. only the changed regions are updated. (this requires the implementation to internally save the screen content, so these updates can be applied to the previous content.))

With incremental=False you ask the server to send you the full screen each time, which requires much more network bandwidth. If you do not care about network bandwidth (for example because you're connection localhost or it's a high-speed internal network), using incremental=False should be okay.

What I currently do not know is how screenshot(…, incremental=True) handles the case where the (server) screen did not change: Basically the client ask the server to send updates, but if there is nothing to update — as nothing changed — how does the server signal the client that it will not send any update packets and that it is done.

I have tried incremental = true. There is no problem, but the screenshot returned from the server is not the time when the picture is changed. It will appear chaotic, a bit like a network byte order. For example, to get three screens, the first time you may get the screen finally refresh, and the third screen will appear the first screen refresh. How can this problem be solved?