Repository navigation
[Feature]: Docs: Recommend targeted mouse udev rule instead of adding user to 'input' group for Wayland click capture #1084
Description
Search existing issues
- I have searched the existing issues
Problem Description
In the Linux installation and platform documentation (Mouse clicks on Wayland), OpenScreen notes that distinguishing mouse clicks from movement on Wayland requires reading /dev/input/event*, and suggests:
sudo usermod -aG input $USERWhile the documentation already includes a very fair caution about this, adding a desktop user account to the input group presents a substantial security hazard:
- Ambient Keylogger Authority: The
inputgroup applies to all/dev/input/event*devices, including physical and virtual keyboards. - Once added to
input, every unprivileged process running under that user (web browsers, build tools, npm/pip/cargo packages, IDE extensions) gains permission to open raw keyboard event streams in the background and record every keystroke (passwords, tokens, SSH keys, private chats).
Proposed Solution
On systemd-based Linux distributions, a safer and cleaner alternative is to deploy a targeted udev rule with TAG+="uaccess":
KERNEL=="event*", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", ENV{ID_INPUT_KEYBOARD}!="1", TAG+="uaccess"
(e.g. placed in /etc/udev/rules.d/70-openscreen-mouse.rules, or deployed declaratively in NixOS / distro packages).
How This Works
- Dynamic Seat ACLs: When a mouse device is plugged in or detected, udev attaches
TAG+="uaccess".systemd-logindautomatically assigns dynamic read/write POSIX ACLs (setfacl) on that specific device node exclusively to the active desktop session user. - Hardware Keyboard Exclusion: Keyboards are strictly excluded (
ENV{ID_INPUT_KEYBOARD}!="1"). Even if userspace is compromised, the kernel refuses to open keyboard character devices. - No Group Membership: The user never needs to join the
inputgroup, and there is no need to log out and log back in for changes to take effect. - No Privileged Binaries: Avoids needing SUID/SGID binaries on disk.
Threat Profile Comparison
| Capability | Default Wayland | With Mouse udev uaccess (Proposed) |
With Scoped setgid Binary | With sudo usermod -aG input |
|---|---|---|---|---|
| Keystrokes / Passwords | 🔒 Blocked | 🔒 Blocked | input) |
🚨 Exposed to all user apps |
| Global Mouse Clicks | 🔒 Blocked | 🔒 Blocked (only helper reads it) | ||
| Relative Mouse Motion | 🔒 Blocked | 🔒 Blocked (only helper reads it) | ||
| Synthetic Click Injection | 🔒 Blocked | 🔒 Blocked | 🔒 Blocked | 🔒 Blocked |
| Device Grab / Freeze | 🔒 Blocked | ioctl |
🔒 Blocked | ioctl |
Additional Context & References
We have documented and verified this approach in our own setups:
- Detailed conceptual analysis: https://wiki.enola.dev/computer/linux/security/evdev-click-telemetry-security
- NixOS packaging & configuration reference: https://nixfiles.vorburger.ch/reference/openscreen
@EtienneLescot — would a docs-only PR updating website/docs/installation.md to explain and recommend this udev approach be a welcome contribution?
@Renna42 as something could potentially include in a future updated nixpgks (IFF there is interest)
Activity
vorburger commentedon Oct 10, 2026
@EtienneLescot just noticed that you tagged this as good first issue, and will interpret this as a Yes re. welcoming a docs PR - I'll raise one.
FYI the
udevrule above wasn't quite right and didn't entirely work like this; I think I've fixed it now - currently verifying, then will contribute.docs: recommend udev rule for Wayland mouse click capture (#1084)
github-actions commentedon Oct 10, 2026
Fixed by #1099 and merged into
main.This change is assigned to the
Next Releaserelease milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked asstatus: pending releaseuntil a packaged release containing it is published.EtienneLescot commentedon Oct 15, 2026
Moved into
v2.1.0as part of the pre-release cut.