7

Can I remove the mouse pointer entirely from X? As in removing it and not just hiding it?

I don't use the mouse at all. Everything I do is completely keyboard driven, so I hide the mouse pointer and disable my touchpad. However, the cursor still has a position on my screen, which causes applications to fire hover events.

This can be extremely annoying, for instance in chrome, if a link happens to intersect the cursor it will display a bright white tooltip in the bottom left of the window.

  • Wouldn't it be enough to move the pointer to a non-annoying location (e.g. one of the screen corners)? – Gilles Feb 22 '17 at 22:20
  • @Gilles I am using a tiling window manager, so I am always using the entire screen such that every point on my screen is inside some window. If however I could move the cursor to a point outside my screen, that would work – BlackCap Feb 22 '17 at 22:31
  • Just disable the pointer driver from xorg.conf then? – Satō Katsura Feb 23 '17 at 9:27
  • The core pointer is so deeply ingrained into X that I don't think it can be completely disabled. Would disconnecting all devices that move it around, and then moving it outside the visible screen space (e.g. with xte or xdotool) be acceptable? – dirkt Feb 23 '17 at 20:32
  • @dirkt Absolutely, however, I cannot move it outside the screen with xdotool. xdotool mousemove 10000 10000 moves the cursor to the bottom right corner of my screen rather than outside, and it does not accept negative numbers. – BlackCap Feb 24 '17 at 21:54
2

Configure your X session to start with the argument -nocursor. For example:

exec /usr/bin/X -nocursor -nolisten tcp "$@"
  • 1
    -nocursor seems to only hide the cursor. It can still be moved around, clicked, and more importantly- trigger hover events – BlackCap Feb 22 '17 at 20:37
  • Hmm, not good. What window manager / desktop environment do you use? Does your distribution have the unclutter program? – airhuff Feb 22 '17 at 20:43
  • I am using XMonad, and tested -nocursor both with and without it. unclutter too only serves to make the cursor invisible, and is in fact how I have been doing so up until now. – BlackCap Feb 22 '17 at 20:45
  • 1
    unclutter may not be what you want though. From the Arch Linux wiki: "Unclutter hides your X mouse cursor when you do not need it, to prevent it from getting in the way. You have only to move the mouse to restore the mouse cursor. Unclutter is very useful in tiling window managers where you do not need the mouse often. " – airhuff Feb 22 '17 at 20:46
  • 1
    Never mind, finally found it here. – 17xande Oct 17 '17 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.