PyVirtualDisplay icon indicating copy to clipboard operation
PyVirtualDisplay copied to clipboard

Hide Mouse Cursor in VirtualDisplay

Open gokulprathin8 opened this issue 4 years ago • 2 comments

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

gokulprathin8 avatar Dec 14 '21 17:12 gokulprathin8

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.

ponty avatar Dec 20 '21 16:12 ponty

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 .....

michaelrampl avatar May 02 '22 11:05 michaelrampl

a3f430307634063f8cf43942d5fa950e8853570f

ponty avatar Sep 18 '23 18:09 ponty