mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 11:59:59 +03:00
11
README.md
11
README.md
@@ -223,6 +223,17 @@ To do so, add `--daemon` to the commandline args:
|
||||
$ cargo run --release -- --daemon
|
||||
```
|
||||
|
||||
In order to start lan-mouse with a graphical session automatically,
|
||||
the [systemd-service](service/lan-mouse.service) can be used:
|
||||
|
||||
Copy the file to `~/.config/systemd/user/` and enable the service:
|
||||
|
||||
```sh
|
||||
cp service/lan-mouse.service ~/.config/systemd/user
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now lan-mouse.service
|
||||
```
|
||||
|
||||
## Configuration
|
||||
To automatically load clients on startup, the file `$XDG_CONFIG_HOME/lan-mouse/config.toml` is parsed.
|
||||
`$XDG_CONFIG_HOME` defaults to `~/.config/`.
|
||||
|
||||
13
service/lan-mouse.service
Normal file
13
service/lan-mouse.service
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Lan Mouse
|
||||
# lan mouse needs an active graphical session
|
||||
After=graphical-session.target
|
||||
# make sure the service terminates with the graphical session
|
||||
BindsTo=graphical-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/lan-mouse --daemon
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
Reference in New Issue
Block a user