2

There are 2 mouses connected to one computer and I want to disable them. I tried to do it using xinput. It works for one mouse (OM), but it doesn't for second (SIGMACHIP Usb Mouse). Second mouse is disabled only for a moment and after about minute it works again. Both mouses are on USB. I checked it on 3 different computers and it acts the same (ubuntu 12.04).

Is there other way to disable mouse for lets say 2 hours and then turn it on again?

adm@l:~$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SIGMACHIP Usb Mouse                       id=10   [slave  pointer  (2)]
⎜   ↳ OM                                        id=9    [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)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Logitech Logitech USB Keyboard            id=8    [slave  keyboard (3)]
adm@l:~$ xinput set-prop 9 "Device Enabled" 0
adm@l:~$ xinput set-prop 10 "Device Enabled" 0
1

I found a solution:

Adding xorg.conf into /etc/X11 helped.

Now disabling mouses works forever, but after plugging new mouse or keyboard you have to enable it manually with xinput.

$ cat xorg.conf

Section "ServerFlags"
        Option  "AutoAddDevices"        "true"
        Option  "AutoEnableDevices"     "false"
        Option  "AllowMouseOpenFail"    "false"
        Option  "AllowEmptyInput"       "on"
EndSection

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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