15

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.

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

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.

  • 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 – nasty pasty Nov 22 '16 at 19:31
  • Much better than unclutter, really – Mauricio Pasquier Juan Jan 12 '18 at 19:22
2

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 
  • 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

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.