ponty / PyVirtualDisplay

Python wrapper for Xvfb, Xephyr and Xvnc
BSD 2-Clause "Simplified" License
714 stars 78 forks source link

Windows support for PyVirtualDisplay #73

Closed oddmario closed 1 year ago

oddmario commented 2 years ago

Hello,

I found a good X11 server for the Windows operating system called Xming (http://www.straightrunning.com/XmingNotes/) which apparently works just like Xvfb

I wanted to ask if someone has ever tried implementing this into PyVirtualDisplay. Will the Windows applications respect the DISPLAY environment variable or that's not used at all unlike the Linux version of the same applications?

zumoshi commented 2 years ago

Correct me if I'm wrong, but AFAIK, Xming is an X server. This means Linux programs (e.g. through ssh tunneling) can display their GUI on your Windows desktop.

Xvfb is a fake "X Server" that, unlike Xming, doesn't actually show anything.

The problem here isn't a missing X server, the problem is that, unlike Linux programs, Windows GUI applications are not X Clients, i.e. they use different API to get the image to the screen. so it doesn't help to have an X Server destination if we can't redirect their output to our fake one by setting the DISPLAY env variable.

If I were to add Windows support, I would look into one of:

Getting an Xvfb working on windows is not useful if you're trying to put native windows executables on a virtual desktop. it would work if you're trying to use a virtual desktop for Linux processes running on windows (e.g. through WSL) though.

ponty commented 2 years ago

"pyvirtualdisplay is a python wrapper for Xvfb, Xephyr and Xvnc"

I have no plan for Xming support and I don't think there are many use cases for it, because it can't be used for testing native Windows programs.