18

I am running Raspbian Jessie on Raspberry PI 2 Model B along with a touchscreen. I just noticed that whenever I use the touchscreen display, mouse pointer also follows my finger tips. I don't want that. I want to be able to permanently hide the mouse pointer whenever I am using the touchscreen and be able to get it back whenever I want the mouse pointer.

I keep reading about unclutter program to hide the mouse pointer, but it doesn't totally hide the mouse pointer. As long as you don't touch the screen or move the mouse, the mouse pointer is hidden by the unclutter program, but when you do it shows the pointer. At least that's what I read.

Any idea?

6
  • 2
    I've seen you on a similar question that i answered can you try running the following can you try running it like this starts -- -nocursor Commented Aug 5, 2016 at 7:27
  • 1
    Yea, but it didn't work.
    – ThN
    Commented Aug 8, 2016 at 21:26
  • 2
    i meant to say startx -- -nocursor also, have you tried using unclutter and simply setting the time to zero? Commented Aug 8, 2016 at 21:27
  • i read about unclutter and it says that it only makes the cursor disappear momentarily not permanently. If there is no mouse movement, pointer appears. If not, it disappears after sometimes. I don't want any mouse pointer at any one time just like on the smartphones.
    – ThN
    Commented Aug 8, 2016 at 21:31
  • 2
    editing the /etc/lightdm/lightdm.conf file. Find the line which starts with xserves-command and edit it to start the X server without cursor. and make it look like this xserver-command=X -nocursor then reboot and startx Commented Aug 8, 2016 at 21:43

4 Answers 4

26

I simply added a nocursor option as follows in the file (/etc/lightdm/lightdm.conf)

xserver-command = X -nocursor

and it worked as it should. No cursor is displayed whatsoever. You can still put your finger on the touch screen and do what you normally do with your mouse pointer; Clicking and Dragging.

5
  • I do want to point out that this answer only seem to work on pitft DISPLAY raspberry pi operating system. I tried this on a regular raspberry PI operating system and it did not work for reason.
    – ThN
    Commented Sep 18, 2017 at 20:33
  • 11
    Make sure to add it at the bottom in the [Seat*] section, not above that. Commented Dec 6, 2017 at 18:42
  • Didnt work on RPi Bullseye
    – A__
    Commented Jul 25, 2023 at 21:02
  • @A__ What display are you using? like Pi approved touchscreen display or full up flat screen monitor? I have 7inch touchscreen display that is specifically meant to be used with Pi. This answer works on it. So, if you are using 3rd party's display, this answer may or may not work. I've been testing Bullseye and I have to agree that they have changed a lot,
    – ThN
    Commented Jul 26, 2023 at 18:30
  • Gotcha. Interesting that the external display is a factor. It's a third party display from ali express, definitely not Pi approved.
    – A__
    Commented Jul 26, 2023 at 19:11
4

To work with any X server (I'm using the stretch version), Edit the /usr/bin/startx file and change the defaultserverargs line to: defaultserverargs="-nocursor"

1

An alternative would be to install unclutter and set it to idle 0:
This would disabled the mouse pointer when using a touch-screen.

sudo apt-get install unclutter
unclutter -idle 0

This could be made permantent by adding unclutter to the session:
vi ~/.config/lxsession/LXDE-pi/autostart
and add
@unclutter -idle 0

1
  • I tried putting unclutter in autostart, and when it booted I didn't have a menu bar. Turns out it's EITHER local autostart (under ~/.config) OR systemwide, not both. I copied the system autostart into the local autostart. That worked and the menu bar is back. See: raspberrypi-spy.co.uk/2014/05/… "Since v0.4.9 If both files are present, lxsession only executes the local file. This means you can no longer use both methods at the same time. Method 2 will take priority over Method 1." Commented Jun 9, 2022 at 22:41
0

If you use Raspbian Lite without X server, type:

export SDL1_VIDEODRIVER=“dispmanx” 

And run fuse.

The emulator gains performance, and the cursor is hidden.

1
  • Is there any indication the OP runs the PI without X?
    – RalfFriedl
    Commented Mar 9, 2019 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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