x11: Disable mouse

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