ponty / PyVirtualDisplay

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

Hide Mouse Cursor in VirtualDisplay #70

Closed gokulprathin8 closed 1 year ago

gokulprathin8 commented 2 years ago

Is there a way to hide the cursor inside of Xvfb?

ponty commented 2 years ago

Can you show me a small program where the cursor is visible inside of Xvfb? If you check the README you see that the cursor is not visible in my examples.

You can always pass extra parameters to Xvfb like

extra_args=["-nocursor"]

Check man xvfb for possible parameters.

michaelrampl commented 2 years ago

I'm using

display = Display(backend="xvfb", extra_args=["-nocursor"])
display.start()
displayEnvVar = os.environ.get("DISPLAY")
os.system("ffmpeg -f x11grab -video_size 1024x768 -framerate 30 -i %s  -draw_mouse 0 out.mp4 &" % (displayEnvVar))

which hides the cursor in both xvfb and ffmpeg .....

ponty commented 1 year ago

a3f430307634063f8cf43942d5fa950e8853570f