Skip to content

Commit

Permalink
Fix udev rule syntax in HelpConnection
Browse files Browse the repository at this point in the history
- Corrected attribute syntax from `ATTR` to `ATTRS` for `idVendor` and `idProduct` in udev rules generation within `HelpConnection.js`. This change ensures proper device identification and access on Linux systems.

"The singular form of udev criteria (KERNEL, SUBSYSTEM, DRIVER, ATTR) only match the device being added, whereas the
plural forms (including ATTRS) match the device being added or any of its parent devices." per https://unix.stackexchange.com/questions/424727/difference-between-attrs-and-attr-in-udev-rules
  • Loading branch information
obra committed May 13, 2024
1 parent 2a56615 commit 14c7e4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/screens/Help/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const HelpConnection = () => {

// First build up a list of all known devices:
const rules = supportedDeviceVIDPIDs().map((device) => {
return `SUBSYSTEM=="usb", ATTR{idVendor}=="${device.usbVendorId
return `SUBSYSTEM=="usb", ATTRS{idVendor}=="${device.usbVendorId
.toString(16)
.padStart(4, "0")}", ATTR{idProduct}=="${device.usbProductId.toString(16).padStart(4, "0")}", SYMLINK+="${
.padStart(4, "0")}", ATTRS{idProduct}=="${device.usbProductId.toString(16).padStart(4, "0")}", SYMLINK+="${
device.productName
}", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"\n`;
});
Expand Down

0 comments on commit 14c7e4f

Please sign in to comment.