16

I am using the Pi as display only device,to show a video feed, so I have no icons and no wallpaper. But the mouse cursor is right there in the middle and when I start the video it gets bigger because of the video resolution. So I wanted to disable it completely.

Any help?

(off-topic) Setting the wallpaper to a blank screen or reducing that inactivity time where the screens blanks wold be useful too.

11

The following:

sudo apt-get install unclutter
unclutter -display :0 -noevents -grab

is known to work perfectly on Raspbian Wheezy.

1
  • 2
    Works on Jessie as well. Also works from the window manager's autoload. May 1 '16 at 19:11
10

The X server has an option -nocursor which would permanently turn off the mouse cursor.

You'd need to edit /etc/X11/xinit/xserverrc to add the option to the default X startup.

I looked around for other places to possibly inject the additional option (-nocursor), but nothing else comes to mind that is display manager agnostic (LXDE, KDE, GNOME, AwesomewM, Fluxbox, etc).

Unclutter (mentioned by @lenik) is also a good solution, although it's often not invoked until a user logs in, which may or may not happen in your case, depending on how you're using the system.

5
  • This didn't work for me on Raspbian Jessie.
    – ThN
    Aug 4 '16 at 12:49
  • 2
    @ThN edit the file here: /etc/lightdm/lightdm.conf , see darmawan-salihun.blogspot.nl/2013/01/…
    – Boy
    Aug 17 '16 at 8:33
  • 1
    @Boy Wow... Simply amazing. It worked. Thanks Boy. :)
    – ThN
    Aug 17 '16 at 13:34
  • You'll probably also need to uncomment the line in lightdm.conf Nov 22 '16 at 19:31
  • Much better than unclutter, really Jan 12 '18 at 19:22
3

Edit the file /etc/lightdm/lightdm.conf by, for example using nano:

# nano /etc/lightdm/lightdm.conf

First find the line xserver-command=X, you can do this in nano using:

ctrl+w xserver-command=X

uncomment the line and add:

-nocursor    

So it looks like this:

xserver-command=X -nocursor 
2
  • Can you explain what this does? Does it need unclutter? Does it completely disable the mouse pointer?
    – not2qubit
    Jan 6 '18 at 6:26
  • 1
    @not2qubit This pass the -nocursor option to the X server. See the doc here: x.org/releases/X11R7.7/doc/man/man1/Xserver.1.xhtml#heading5 It only disable the display of the cursor, so it's still there, but only invisible. I had an issue with this as it would still trigger hover effect on webpages. To workaround this, I added the command xdotool mousemove 9001 9001 to my startup script. It moves the mouse to the bottom right of the screen. xdotool can be installed from the raspbian repositories. Feb 6 '20 at 10:21
1

On the latest Raspbian Stitch (4.9.59-v7+), using unclutter seem the best way with simple options of relevant control. One thing I noticed is that using -idle 0 is a bad idea, and make the mouse flicker and overload the CPU. However, any number above 1s is good. The best option I found seem to be:

unclutter -display :0 -idle 3 -root -noevents

If you want this to start automatically, you have two add this line prefixed with an @ in one of two choices of where to put it:

  1. /etc/xdg/lxsession/LXDE-pi/autostart (recommended)
  2. /etc/xdg/lxsession/LXDE/autostart

Not sure what's the difference, but the LXDE-pi one is working.

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.