Configuring device access for Wootility under Linux (udev rules)
The purpose of this article of to help you setup access to your Wooting keyboard on a Linux OS.
Our software communicates with the keyboards we make directly. This is not an issue in and of itself but Linux has some added safety layers surrounding this. In this small guide we will tell you about how to setup so called udev rules so that your Linux user can run software that accesses the keyboard directly. No need to sudo Wootility or Chromium just so you can configure your keyboard.
Granting access with udev
Creating the rules
Create a new file called 70-wooting.rules (you can replace the word wooting with whatever you want) under the path /etc/udev/rules.d/ with the following content. The file extension must be rules otherwise it wont work.
Example /etc/udev/rules.d/70-wooting.rules
# Wooting One Legacy
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", MODE:="0660", GROUP="input", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", MODE:="0660", GROUP="input", TAG+="uaccess"
# Wooting One update mode
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", MODE:="0660", GROUP="input", TAG+="uaccess"
# Wooting Two Legacy
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", MODE:="0660", GROUP="input", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", MODE:="0660", GROUP="input", TAG+="uaccess"
# Wooting Two update mode
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", MODE:="0660", GROUP="input", TAG+="uaccess"
# Generic Wootings
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", MODE:="0660", GROUP="input", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", MODE:="0660", GROUP="input", TAG+="uaccess"
# Wooting One Legacy for snap Chromium (Ubuntu)
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="snap_chromium_chromedriver"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="snap_chromium_chromium"
# Wooting One update mode for snap Chromium (Ubuntu)
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="snap_chromium_chromedriver"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="snap_chromium_chromium"
# Wooting Two Legacy for snap Chromium (Ubuntu)
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="snap_chromium_chromedriver"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="snap_chromium_chromium"
# Wooting Two update mode for snap Chromium (Ubuntu)
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", TAG+="snap_chromium_chromedriver"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", TAG+="snap_chromium_chromium"
# Generic Wootings for snap Chromium (Ubuntu)
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="snap_chromium_chromedriver"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="snap_chromium_chromium"
Explanation of the rules
The rules use ACL (Access Control List) to give permissions to the currently logged in user, as well as all users in the input group. Your own user account doesn't need to be in the input group but this is added as some Linux distributions may not support the TAG+="uaccess" element.
We also added a section for snap installations of Chromium browsers. This is solved with TAG+="snap_chromium_chromedriver" and TAG+="snap_chromium_chromium" being granted for the hidraw subsystem and our VendorIDs as well as ProductIDs.
Applying the new rules
To load and apply the new rules you have 2 options:
- Restart your PC
- Run a command to reload the rules
Restarting your PC should not need an explanation but running the command on the other hand does.
If you want to avoid restarting your computer you can try running the following command to force a reload of the udev rules:
sudo udevadm control --reload-rules && sudo udevadm trigger
Here is a small breakdown of the commands you run:
sudojust runs the following command with elevated root permissionsudevadmthis is the command for the udev management toolcontrol --reload-rulesinstructs the udevadm to reload all rules (including newly created ones)&&runs the command after it after the command before it has finished (logical and)sudoas mentioned above runs the following command with root permissionsudevadmas mentioned above this is the udev management tooltriggerused to replay kernel events in regards to usb
Different distributions can use different commands and tools, you need to check if the mentioned system inputs are supported by your distribution.