2

I would like to disable a specific usb device (mouse) via Ubuntu Terminal. I have Ubuntu 14.04 and I tried this method and this method but both do not work with kernel 3.x. Any suggestion?

1 Answer 1

4

Shamelessly stolen from here, so made CW (credits to Peng Wu on Ask Ubuntu);

Run xinput --list to list the attached devices:

% xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ USB2.0 HD UVC WebCam                      id=10   [slave  keyboard (3)]
    ↳ Asus WMI hotkeys                          id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]

Find your mouse (in my case I have a touchpad, ETPS/2 Elantech Touchpad) and note down its id (in my case it's 13); then run

xinput set-prop 13 "Device Enabled" 0

to disable it and

xinput set-prop 13 "Device Enabled" 1

to re-enable it again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .