include udev rule and add uninstall.sh
This commit is contained in:
parent
825781901c
commit
7d4ff5f864
5 changed files with 15 additions and 9 deletions
2
80-dotool.rules
Normal file
2
80-dotool.rules
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# This allows users in group input to use dotool without root permissions.
|
||||||
|
KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
|
11
README.md
11
README.md
|
@ -5,18 +5,13 @@ It works everywhere on Linux, including in X11, Wayland and TTYs.
|
||||||
|
|
||||||
It takes about half a second to register the virtual device, but it can be kept using the daemon.
|
It takes about half a second to register the virtual device, but it can be kept using the daemon.
|
||||||
|
|
||||||
## Install
|
## Install From Source
|
||||||
|
|
||||||
Run `go build` with go (>=1.19) and copy `dotool`, `dotoold` and `dotoolc` into your PATH.
|
With go (>=1.19) run `sudo ./install.sh`.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
dotool will usually require root permissions unless you add a udev rule for uinput.
|
dotool will require root permissions unless you are in group input.
|
||||||
You could run these commands to add a rule for yourself and make it effective:
|
|
||||||
```
|
|
||||||
echo KERNEL==\"uinput\", GROUP=\"$USER\", MODE:=\"0660\" | sudo tee /etc/udev/rules.d/99-dotool-$USER.rules
|
|
||||||
sudo udevadm trigger
|
|
||||||
```
|
|
||||||
|
|
||||||
This greets the world:
|
This greets the world:
|
||||||
`echo 'type Sup, Lads!' | dotool`
|
`echo 'type Sup, Lads!' | dotool`
|
||||||
|
|
|
@ -168,6 +168,10 @@ The commands are:
|
||||||
|
|
||||||
Example: echo "key h i shift+1" | dotool
|
Example: echo "key h i shift+1" | dotool
|
||||||
|
|
||||||
|
dotool is installed with a udev rule to allow users in group input to run
|
||||||
|
it without root permissions. You can make it effective without rebooting by
|
||||||
|
running: sudo udevadm trigger
|
||||||
|
|
||||||
The keys are those used by Linux, but can also be specified using X11 names
|
The keys are those used by Linux, but can also be specified using X11 names
|
||||||
prefixed with x: like x:exclam, as well as their Linux keycode like k:30.
|
prefixed with x: like x:exclam, as well as their Linux keycode like k:30.
|
||||||
They are case insensitive, except uppercase character keys also simulate shift.
|
They are case insensitive, except uppercase character keys also simulate shift.
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
go build && cp dotool dotoolc dotoold /usr/local/bin
|
go build && cp -v dotool dotoolc dotoold /usr/local/bin
|
||||||
|
cp -v 80-dotool.rules /etc/udev/rules.d
|
||||||
|
udevadm trigger
|
||||||
|
|
3
uninstall.sh
Executable file
3
uninstall.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
rm -vf /usr/local/bin/dotool /usr/local/bin/dotoolc /usr/local/bin/dotoold
|
||||||
|
rm -vf /etc/udev/rules.d/80-dotool.rules
|
Loading…
Reference in a new issue