I have configured kiosk in raspberry pi with touch screen.


When I am using the USB mouse then cursor is not showing.

I have followed


I am able to hide mouse cursor using

sudo apt-get install x11-xserver-utils unclutter


xserver-command=X -nocursor

but I want to enable the mouse cursor when I plug the USB mouse.



  • This is not a question belonging to Raspberry Pi.
    – Ingo
    Commented Feb 22, 2019 at 13:47

1 Answer 1


There is a fork of unclutter which can be instructed to hide the cursor on a touch event. When called with a -touch argument, it hides the cursor instantly on a touch input, and displays it again on a mouse move.

Alternatively, you can write a udev rule and execute your own script which hides the cursor (using unclutter or otherwise, e.g. xinput -cursor /transparent/cursor/file) when a mouse is plugged in. A USB mouse can be detected by this rule for instance.

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.