Can I remove the mouse pointer entirely from X?
7,890
Configure your X
session to start with the argument -nocursor
. For example:
exec /usr/bin/X -nocursor -nolisten tcp "$@"
Related videos on Youtube
Author by
BlackCap
Updated on September 18, 2022Comments
-
BlackCap over 1 year
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.
-
Gilles 'SO- stop being evil' about 7 yearsWouldn't it be enough to move the pointer to a non-annoying location (e.g. one of the screen corners)?
-
BlackCap about 7 years@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
-
Satō Katsura about 7 yearsJust disable the pointer driver from
xorg.conf
then? -
dirkt about 7 yearsThe 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
orxdotool
) be acceptable? -
dirkt about 7 years
xte
accepts negative numbers, but myfvwm
seems to intercept and correct the mouse position because of virtual desktops. Worth a try with your WM.
-
-
BlackCap about 7 years
-nocursor
seems to only hide the cursor. It can still be moved around, clicked, and more importantly- trigger hover events -
airhuff about 7 yearsHmm, not good. What window manager / desktop environment do you use? Does your distribution have the
unclutter
program? -
BlackCap about 7 yearsI 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. -
airhuff about 7 years
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 about 7 yearsIf I remove or disable my external USB mouse, then
rmmod psmouse
not only disables my touchpad, but makes the mouse cursor disappear. Have you tried anything along these lines (i.e.rmmod psmouse
)? -
BlackCap about 7 years
rmmod psmouse
did absolutely nothing for me. It did unload the module but the touchpad is still usable. If I disable the touchpad withxinput
the cursor is still visible. -
airhuff about 7 yearsDoes
lsmod |grep mou
show anything else looking like a mouse-related module, likemousedev
? If so, andrmmod mousedev
doesn't work, then I'll keep looking, but off-hand I'm stumped. -
BlackCap about 7 years
lsmod | grep mou
listed mousedev and nothing else.rmmod mousedev
did not help. I also found thatsynaptics
was installed on the machine, so I removed it and rebooted, which also did not help. -
17xande over 6 yearscan anyone point me to where the
-nocursor
flag is documented? I can't find anything in the man pages I've seen so far. I'm running onraspian stretch
. -
17xande over 6 yearsNever mind, finally found it here.
-
BlackCap almost 6 yearsAfter uninstalling the entirety of gnome, suddenly
-nocursor
works, which is odd because I remember testing this withstartx
. I suppose something overloaded it.