diff --git a/docs/rules.md b/docs/rules.md index 164c186b..100cd27d 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -13,9 +13,14 @@ When running under Wayland with X11 libraries loaded some features will not be a When running under Wayland without X11 libraries loaded even more features will not be available. Rule features known not to work under Wayland include process and mouse process conditions. Under Wayland using keyboard groups may result in incorrect symbols being input for simulated input. -Under Wayland simulating inputs when modifier keys are pressed may result in incorrect symbols being input. +Under Wayland simulating inputs when modifier keys are pressed may result in incorrect symbols being sent. Simulated input uses Xtest if available under X11 or uinput if the user has write access to /dev/uinput. -To get access to /dev/uinput run `sudo setfacl -m u:${user}:rw /dev/uinput`* +The easiest way to maintain write access to /dev/uinput is to use Solaar's alternative udev rule by downloading +`https://raw.githubusercontent.com/pwr-Solaar/Solaar/master/rules.d-uinput/42-logitech-unify-permissions.rules` +and copying it as root into the `/etc/udev/rules.d` directory. +You may have to reboot your system for the write permission to be set up. +Another way to get write access to /dev/uinput is to run `sudo setfacl -m u:${USER}:rw /dev/uinput` +but this needs to be done every time the system is rebooted.* Logitech devices that use HID++ version 2.0 or greater produce feature-based notifications that Solaar can process using a simple rule language. For diff --git a/rules.d-uinput/42-logitech-unify-permissions.rules b/rules.d-uinput/42-logitech-unify-permissions.rules new file mode 100644 index 00000000..d5c80110 --- /dev/null +++ b/rules.d-uinput/42-logitech-unify-permissions.rules @@ -0,0 +1,33 @@ +# This rule was added by Solaar. +# +# Allows non-root users to have raw access to Logitech devices. +# Allowing users to write to the device is potentially dangerous +# because they could perform firmware updates. +KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput" + +ACTION != "add", GOTO="solaar_end" +SUBSYSTEM != "hidraw", GOTO="solaar_end" + +# USB-connected Logitech receivers and devices +ATTRS{idVendor}=="046d", GOTO="solaar_apply" + +# Lenovo nano receiver +ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6042", GOTO="solaar_apply" + +# Bluetooth-connected Logitech devices +KERNELS == "0005:046D:*", GOTO="solaar_apply" + +GOTO="solaar_end" + +LABEL="solaar_apply" + +# Allow any seated user to access the receiver. +# uaccess: modern ACL-enabled udev +# udev-acl: for Ubuntu 12.10 and older +TAG+="uaccess", TAG+="udev-acl" + +# Grant members of the "plugdev" group access to receiver (useful for SSH users) +#MODE="0660", GROUP="plugdev" + +LABEL="solaar_end" +# vim: ft=udevrules