x11: Disable mouse

18,470

Solution 1

For the mouse, proceed as follows. Use xinput list to find out your mouse devices. Disable with

xinput set-prop 12 "Device Enabled" 0

to enable it again, type

xinput set-prop 12 "Device Enabled" 1

where 12 is the id of your device. Given that the mouse cursor disappears if mouse is inactive, you need not to worry about that (if it doesn't, you can use unclutter)

Solution 2

After reading the answer from @January and the man page of xinput I noticed a shorter version:

xinput --enable 12
xinput --disable 12

where 12 is the id of your device

Solution 3

Another answer to your question is to unload the module that is responsible for.

sudo modprobe -rvf psmouse

Thanks

Share:
18,470

Related videos on Youtube

a b
Author by

a b

Updated on September 18, 2022

Comments

  • a b
    a b over 1 year

    I use x11 and awesome as my WM. I would like to completely disable the mouse, that is mouse clicks, mouse wheel, mouse movement, display of the cursor, etc.

    Is there an easy way (I would prefer a disable/enable bash script)?

    Thanks!

  • Jayen
    Jayen almost 4 years
    unfortunately i have 2 built-in psmouse and i only want to disable one