[GH-ISSUE #286] Systemd service file (service/lan-mouse.service) uses incorrect 'daemon' argument #142

Closed
opened 2026-05-05 22:11:27 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @ChuckWheat on GitHub (Apr 3, 2025).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/286

Hi, I was following the instructions in the README under the "Daemon Mode" section to set up the systemd user service on Arch Linux (CachyOS).

I copied the service/lan-mouse.service file to ~/.config/systemd/user/ as instructed. When enabling and starting the service (systemctl --user enable --now lan-mouse.service), it immediately failed with Result: exit-code and status=2.

Running /usr/bin/lan-mouse daemon manually from the terminal confirmed the error: error: unexpected argument 'daemon' found. Checking the help output (lan-mouse --help) shows that daemon is not a subcommand, but an option flag (-d or --daemon).

The current ExecStart line in service/lan-mouse.service is:
ExecStart=/usr/bin/lan-mouse daemon

This should be changed to use the correct flag.
ExecStart=/usr/bin/lan-mouse -d (or ExecStart=/usr/bin/lan-mouse --daemon)

After making this change locally in my ~/.config/systemd/user/lan-mouse.service file, the service starts and runs correctly.

Thanks for the great software! I use it daily

Originally created by @ChuckWheat on GitHub (Apr 3, 2025). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/286 Hi, I was following the instructions in the README under the "Daemon Mode" section to set up the systemd user service on Arch Linux (CachyOS). I copied the `service/lan-mouse.service` file to `~/.config/systemd/user/` as instructed. When enabling and starting the service (`systemctl --user enable --now lan-mouse.service`), it immediately failed with Result: exit-code and status=2. Running `/usr/bin/lan-mouse daemon` manually from the terminal confirmed the error: `error: unexpected argument 'daemon' found`. Checking the help output (`lan-mouse --help`) shows that daemon is not a subcommand, but an option flag (-d or --daemon). The current ExecStart line in service/lan-mouse.service is: `ExecStart=/usr/bin/lan-mouse daemon` This should be changed to use the correct flag. `ExecStart=/usr/bin/lan-mouse -d` (or `ExecStart=/usr/bin/lan-mouse --daemon`) After making this change locally in my `~/.config/systemd/user/lan-mouse.service` file, the service starts and runs correctly. Thanks for the great software! I use it daily
Author
Owner

@feschber commented on GitHub (Apr 4, 2025):

This is actually intentional because I changed the way the subcommand works in the latest version.
For now you will need to patch it (the way you did) or take the file from an older revision.

<!-- gh-comment-id:2779867232 --> @feschber commented on GitHub (Apr 4, 2025): This is actually intentional because I changed the way the subcommand works in the latest version. For now you will need to patch it (the way you did) or take the file from an older revision.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#142
No description provided.