You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
committed
Add raw evdev input emulation backend
Adds an evdev/uinput-based input emulation backend for Linux that creates
a virtual mouse/keyboard, bypassing Wayland restrictions. Useful as a
fallback on systems without a working remote desktop portal (e.g. COSMIC).
Rebased onto the build.rs cfg-alias mechanism (evdev / evdev_emulation)
introduced after the original PR. The backend is preferred in the
auto-fallback order when /dev/uinput is accessible and falls back cleanly
to the other backends otherwise. Documents the udev-rule permissions setup
in the README.
Original work by Sam Vervaeck (feschber#297).
Co-authored-by: Sam Vervaeck <samvv@pm.me>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,27 @@ Most current desktop environments and operating systems are fully supported, thi
55
55
56
56
For more detailed information about os support see [Detailed OS Support](#detailed-os-support)
57
57
58
+
### evdev emulation backend (Linux)
59
+
60
+
On Linux, Lan Mouse can emulate input through a virtual `evdev`/`uinput` device.
61
+
This backend works independently of the compositor and is useful as a fallback on
62
+
systems without a working remote desktop portal (for example COSMIC).
63
+
64
+
It requires access to `/dev/uinput`. Rather than running as root, grant your user
65
+
access with a dedicated group and a udev rule:
66
+
67
+
```sh
68
+
sudo groupadd --system lan-mouse
69
+
sudo usermod -aG lan-mouse <username>
70
+
echo'KERNEL=="uinput", GROUP="lan-mouse"'| sudo tee /lib/udev/rules.d/05-lan-mouse.rules
71
+
```
72
+
73
+
Log out and back in (or reboot) for the group change to take effect. When
74
+
`/dev/uinput` is accessible, the `evdev` backend is preferred automatically; if it
75
+
is not accessible, Lan Mouse falls back to the other emulation backends. It can
76
+
also be selected explicitly with `--emulation-backend evdev` or via
77
+
`emulation_backend = "evdev"` in the config.
78
+
58
79
### Android & IOS
59
80
60
81
A proof of concept for an Android / IOS Application by [rohitsangwan01](https://github.com/rohitsangwan01) can be found [here](https://github.com/rohitsangwan01/lan-mouse-mobile).
0 commit comments