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.

techraf
  • 4,319
  • 10
  • 31
  • 42
rcsimoes
  • 171
  • 1
  • 1
  • 4

4 Answers4

12

The following:

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

is known to work perfectly on Raspbian Wheezy.

techraf
  • 4,319
  • 10
  • 31
  • 42
lenik
  • 11,541
  • 1
  • 30
  • 37
  • 2
    Works on Jessie as well. Also works from the window manager's autoload. – ClearCrescendo May 01 '16 at 19:11
  • done - test disable wifi, disable bluetooth done - test pointer hide on current image done - add disable wifi, disable bluetooth to take 2 doc done - add pointer hiding setting to take 2 doc – Steven J Owens Jun 09 '22 at 23:00
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.

lornix
  • 1,066
  • 8
  • 13
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 
Darth Vader
  • 4,206
  • 24
  • 45
  • 69
700L
  • 31
  • 2
  • Can you explain what this does? Does it need unclutter? Does it completely disable the mouse pointer? – not2qubit Jan 06 '18 at 06:26
  • 1
    @not2qubit This pass the -nocursor option to the X server. See the doc here: https://www.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. – Vincent Arnaud Feb 06 '20 at 10:21
2

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.

not2qubit
  • 1,407
  • 2
  • 14
  • 23