69-hid.rules 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # This is a sample udev file for HIDAPI devices which lets unprivileged
  2. # users who are physically present at the system (not remote users) access
  3. # HID devices.
  4. # If you are using the libusb implementation of hidapi (libusb/hid.c), then
  5. # use something like the following line, substituting the VID and PID with
  6. # those of your device.
  7. # HIDAPI/libusb
  8. SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", TAG+="uaccess"
  9. # If you are using the hidraw implementation (linux/hid.c), then do something
  10. # like the following, substituting the VID and PID with your device.
  11. # HIDAPI/hidraw
  12. KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", TAG+="uaccess"
  13. # Once done, optionally rename this file for your application, and drop it into
  14. # /etc/udev/rules.d/.
  15. # NOTE: these rules must have priority before 73-seat-late.rules.
  16. # (Small discussion/explanation in systemd repo:
  17. # https://github.com/systemd/systemd/issues/4288#issuecomment-348166161)
  18. # for example, name the file /etc/udev/rules.d/70-my-application-hid.rules.
  19. # Then, replug your device or run:
  20. # sudo udevadm control --reload-rules && sudo udevadm trigger
  21. # Note that the hexadecimal values for VID and PID are case sensitive and
  22. # must be lower case.
  23. # TAG+="uaccess" only gives permission to physically present users, which
  24. # is appropriate in most scenarios. If you require access to the device
  25. # from a remote session (e.g. over SSH), add
  26. # GROUP="plugdev", MODE="660"
  27. # to the end of the udev rule lines, add your user to the plugdev group with:
  28. # usermod -aG plugdev USERNAME
  29. # then log out and log back in (or restart the system).