Xvfb with -nocursor shows cursor anyway

9

I'm using xvfb-run to execute Xvfb:

xvfb-run \
  --server-num 44 \
  -s "-nocursor -ac -screen 0 1280x720x24" \
  chromium-browser \
    --temp-profile \
    --window-size=1280,720 \
    --disable-gpu \
    --window-position=0,0 \
    --app=http://example.com

If I then look at the process list, I see the expected Xvfb process and parameters:

Xvfb :44 -nocursor -ac -screen 0 1280x720x24 -nolisten tcp -auth /tmp/xvfb-run.3QqQAT/Xauthority

Despite that -nocursor is there, the cursor definitely still shows up if I use something like FFmpeg's x11grab to see the output of that window.

Cursor is still visible in X11 window

Even unloading the psmouse module doesn't fix this.

What's the proper way to specify that the cursor should be completely hidden?

Ubuntu 16.04 Server.

Brad

Posted 2017-03-30T23:02:40.007

Reputation: 4 459

Answers

12

It turns out that I just need to specify -draw_mouse 0 on the FFmpeg command line. A good friend of mine tells me that x11grab sits at one layer below the Xvfb stuff, so that while the cursor isn't drawn on the frame buffer, x11grab will draw it.

Brad

Posted 2017-03-30T23:02:40.007

Reputation: 4 459

1Note that -draw_mouse 0 is an input option, so it has to go before the -i argument, otherwise it won't work. – Douglas Manley – 2018-05-09T14:08:33.270