diff options
author | nat-418 <93013864+nat-418@users.noreply.github.com> | 2022-04-07 20:39:57 +0200 |
---|---|---|
committer | Wez Furlong <wez@wezfurlong.org> | 2022-04-08 05:51:46 -0700 |
commit | e4d8f8b070cc108c9e841cfa1e64073b33632672 (patch) | |
tree | b40dffc00a265d730f59f98e71e1af1187143231 | |
parent | 08aaf99acff6207eccabb5f2e3986fe9ae4d1342 (diff) |
Update README with sudo alternative
-rw-r--r-- | README.md | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -110,6 +110,19 @@ To run the remapper, invoke it *as root* (so that it can grab exclusive access t $ sudo target/release/evremap remap my-config-file.toml ``` +Or, grant an unprivileged user access to `evdev` and `uinput`. +On Ubuntu, this can be configured by running the following commands and rebooting: + +``` +sudo gpasswd -a YOUR_USER input +echo 'KERNEL=="uinput", GROUP="input"' | sudo tee /etc/udev/rules.d/input.rules +``` + +For some platforms, you might need to create an `input` group first and run: +``` +echo 'KERNEL=="event*", NAME="input/%k", MODE="660", GROUP="input"' | sudo tee /etc/udev/rules.d/input.rules as well. +``` + ## Systemd A sample system service unit is included in the repo. You'll want to adjust the paths to match @@ -124,5 +137,4 @@ $ sudo systemctl start evremap.service ## How do I make this execute a command when a key is pressed? -Since the remapper runs as root, it seems like a dangerous idea to have it -directly trigger commands, so that feature is not implemented. +That feature is not implemented. |