How to get the mouse cursor disappear when playing a video

I have a qube named “video” and in it I use mpv to play video files (mp4, webm, etc.). While the video plays, the mouse cursor never disappears from the screen and always stays visible. Is there a way to get the mouse cursor disappear?

Main idea : a keyboard shortcut hides your cursor (by switching to a blank/invisible cursor).

Install a blank cursor to your cursor theme (here Adwaita):

[user@dom0 ~]$ cat blank
#define blank_width 1
#define blank_height 1
#define blank_x_hot 0
#define blank_y_hot 0
static unsigned char blank_bits[] = {
    0x00 };
[user@dom0 ~]$ sudo cp blank /usr/share/icons/Adwaita/cursors/

Test switching to the blank cursor and go back to the default cursor:

[user@dom0 ~]$ xsetroot -cursor blank blank
[user@dom0 ~]$ xsetroot -cursor_name left_ptr

Add the keyboard shortcuts: XFCE setting > Keyboard > shortcuts

  • Alt-F12 : xsetroot -cursor_name left_ptr
  • Alt-Shift-F12 : xsetroot -cursor blank blank


  • play your video in fullscreen from your web browser or video player
  • press Alt-Shift-F12 to hide the cursor
  • when finished, press Alt-F12 to show the cursor

I daily use this solution. Anyone with another solution?


Thanks for writing this. But this is rather convoluted. If anyone else have a simpler, more straightforward solution, I would like to hear that.

Create 1 file and 2 keyboard shorcuts is extremely complex and difficult to follow ?? :thinking:
Where did you struggle ?

You could move the cursor in one of the screen corner (except top-left).
Only 1 pixel will be visible, you shouldn’t see it while watching video.

related github issue: Hiding the mouse cursor does not work

1 Like

Note: copying the blank file into the cursor folder is superfluous…you can leave it in dom0 home.

@tanky0u I’ve looked around for better solutions, but this does indeed seem to be the best one if you don’t want to install additional software into dom0. You can mark ludovic’s answer as the solution.