Skip to content

Commit e9f8c3e

Browse files
authored
udev.rules documentation improvement (#326)
As recently discovered (thanks @tresf), the `TAG+="uaccess"` has to be used before `73-seat-late.rules` and not before `70-uaccess.rules`. Technically it doesn't harm to have a more restrictive recommenration, but it was not technically correct. Refference on `uaccess` TAG consumption: [1](https://github.com/systemd/systemd/blob/3a1220eedfb65355c387c29584380742a21917aa/src/login/73-seat-late.rules.in), [2](https://www.apt-browse.org/browse/debian/wheezy/main/amd64/systemd/44-11+deb7u4/file/lib/udev/rules.d/73-seat-late.rules).
1 parent 11cc0e8 commit e9f8c3e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

udev/69-hid.rules

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", TAG+="uacce
1616
KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", TAG+="uaccess"
1717

1818
# Once done, optionally rename this file for your application, and drop it into
19-
# /etc/udev/rules.d. Note that these rules must have priorty before 70-uaccess.rules
20-
# for example, name the file /etc/udev/rules.d/69-my-application-hid.rules.
19+
# /etc/udev/rules.d/.
20+
# NOTE: these rules must have priorty before 73-seat-late.rules.
21+
# (Small discussion/explanation in systemd repo:
22+
# https://github.com/systemd/systemd/issues/4288#issuecomment-348166161)
23+
# for example, name the file /etc/udev/rules.d/70-my-application-hid.rules.
2124
# Then, replug your device or run:
2225
# sudo udevadm control --reload-rules && sudo udevadm trigger
2326

2427
# Note that the hexadecimal values for VID and PID are case sensitive and
2528
# must be lower case.
2629

2730
# TAG+="uaccess" only gives permission to physically present users, which
28-
# is appropriate in most scenarios. If you require remote access to the
29-
# device, add
31+
# is appropriate in most scenarios. If you require access to the device
32+
# from a remote session (e.g. over SSH), add
3033
# GROUP="plugdev", MODE="660"
3134
# to the end of the udev rule lines, add your user to the plugdev group with:
3235
# usermod -aG plugdev USERNAME

0 commit comments

Comments
 (0)