Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Thank you for this fantastic answer! The combined udev rule works perfectly fine without the OWNER assignment, which I figure the original poster had set to troubleshoot errors with environment variables. I was also able to streamline the setup by removing the wrapper script (to tell the truth, I am not quite sure why the OP added it in the first place). The only issue left is that the script is called several times upon removing or connecting the mouse. This is the syslog output with udev's logging level set to info. Commented Apr 8, 2013 at 0:17
  • Can you think of any way I can specify the rule further so that it is executed just once? Also, thanks for the advice on the placement of the script. I wasn't aware of the security issues. I'll definitely take this into consideration from now on! Commented Apr 8, 2013 at 0:17
  • 1
    try adding ENV{ID_TYPE}!="hid" or ENV{ID_USB_DRIVER}!="*hid*" and see if it works. Commented Apr 8, 2013 at 1:00
  • Yep, that's it. ENV{ID_TYPE}!="hid" worked fine. Thank you! Commented Apr 8, 2013 at 1:33
  • One of the rare answers on udev that go beyond saying "just add ENV{DEVTYPE}=="usb_device" to your rules", but also explain why. Thank you! Commented Oct 22, 2015 at 10:30