Merge pull request #863 from keyboardio/udev/rule-updates

Update the udev rules to tag devices as uaccess and seat
pull/871/head
Jesse Vincent 5 years ago committed by GitHub
commit 1ef6bad6b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -70,7 +70,7 @@ for my $path (@paths) {
} }
if ( $devices{$path}{'ID_MM_CANDIDATE'}) { if ( $devices{$path}{'ID_MM_CANDIDATE'}) {
my $rules = "$Bin/../etc/99-kaleidoscope.rules"; my $rules = "$Bin/../etc/60-kaleidoscope.rules";
print_warning <<EOWARN print_warning <<EOWARN
WARNING: your udev rules are currently configured to suggest WARNING: your udev rules are currently configured to suggest
@ -90,4 +90,3 @@ EOWARN
#debug("ERROR: I couldn't find a USB device matching the keyboard's USB Vendor and Device IDs\n"); #debug("ERROR: I couldn't find a USB device matching the keyboard's USB Vendor and Device IDs\n");
#print_warning(join("\n",@log)); #print_warning(join("\n",@log));

@ -53,8 +53,8 @@ Next step: [Add keyboard support to Arduino](#add-keyboard-support-to-arduino)
3. On Ubuntu, you will have to prevent ModemManager from attempting to grab the keyboard virtual serial port when it goes into bootloader mode: 3. On Ubuntu, you will have to prevent ModemManager from attempting to grab the keyboard virtual serial port when it goes into bootloader mode:
```sh ```sh
$ wget https://raw.githubusercontent.com/keyboardio/Kaleidoscope/master/etc/99-kaleidoscope.rules $ wget https://raw.githubusercontent.com/keyboardio/Kaleidoscope/master/etc/60-kaleidoscope.rules
$ sudo cp 99-kaleidoscope.rules /etc/udev/rules.d $ sudo cp 60-kaleidoscope.rules /etc/udev/rules.d
$ sudo /etc/init.d/udev reload $ sudo /etc/init.d/udev reload
``` ```

@ -0,0 +1,16 @@
## This file sets up a few things for selected Kaleidoscope-powered keyboards:
## - We first symlink the device to a more friendly name, based on the product
## name.
## - We then ask ModemManager to ignore the serial ports on the device, and not
## consider them a candidate.
## - We also tell systemd to grant access to the device (via ACLs) to the user
## at-seat.
##
## For more information about the access part, see the following resources:
## - https://github.com/systemd/systemd/issues/4288
## - https://www.freedesktop.org/software/systemd/man/sd-login.html
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2300", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2301", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", SYMLINK+="Atreus2", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2303", SYMLINK+="Atreus2", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"

@ -1,4 +0,0 @@
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2300", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2301", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", SYMLINK+="Atreus2", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2303", SYMLINK+="Atreus2", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0"
Loading…
Cancel
Save