Skip to content

docs: README — non-root ydotoold setup (systemd user service + input-group udev rule)#315

Open
SMC17 wants to merge 1 commit into
ReimuNotMoe:masterfrom
SMC17:docs-systemd-user-uinput-setup
Open

docs: README — non-root ydotoold setup (systemd user service + input-group udev rule)#315
SMC17 wants to merge 1 commit into
ReimuNotMoe:masterfrom
SMC17:docs-systemd-user-uinput-setup

Conversation

@SMC17
Copy link
Copy Markdown

@SMC17 SMC17 commented May 19, 2026

The current README says "ydotoold (daemon) program requires access to /dev/uinput. This usually requires root permissions." — which leads users to assemble the non-root setup from external blog posts and frequently get it wrong. Several open issues document this exact pain (#42, #73, #207, #210).

This PR adds a short "Running ydotoold without root (recommended setup)" subsection right after the existing Runtime note. The pattern shipped here is the minimal working configuration verified on Arch Linux 6.x + Hyprland (Wayland):

  1. usermod -aG input "$USER" — input group for /dev/uinput access
  2. /etc/udev/rules.d/60-uinput.rulesKERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
  3. udevadm control --reload-rules + modprobe -r uinput && modprobe uinput so the static_node option applies on this load
  4. systemctl --user enable --now ydotoold.service (built by default when SYSTEMD_USER_SERVICE=ON)
  5. export YDOTOOL_SOCKET="$XDG_RUNTIME_DIR/.ydotool_socket" — the user service writes the socket under $XDG_RUNTIME_DIR, not /tmp

Pure docs change; no code touched. The diff is +49 / -0 on README.md only.

Why it matters

The recurring question pattern in the issue tracker is the same: "I built ydotool, the daemon won't start as my user, I added the udev rule, it still doesn't work." Almost always the missing step is either step 3 (the rule doesn't apply until the module is reloaded) or step 5 (the socket path under $XDG_RUNTIME_DIR rather than /tmp). Documenting both inline avoids the cycle.

Does not close any issues automatically, but addresses the recurring question pattern in:

Happy to revise if the maintainer prefers a different framing or location in the README.

Documents the systemd-user + input-group + udev-rule pattern that
multiple open issues (ReimuNotMoe#42, ReimuNotMoe#73, ReimuNotMoe#207, ReimuNotMoe#210) have asked for. The
README currently states 'this usually requires root permissions',
which leads users to assemble the non-root setup from external blog
posts and frequently get it wrong.

The pattern shipped here is the minimal working configuration:
- input group membership for /dev/uinput access
- udev rule with KERNEL=="uinput" + GROUP="input" + MODE="0660"
- modprobe + static_node uinput so the rule applies on load
- systemd --user enable ydotoold.service (built by default)
- YDOTOOL_SOCKET pointing at $XDG_RUNTIME_DIR/.ydotool_socket

Tested on Arch Linux 6.x + Hyprland (Wayland).

Pure docs change; no code touched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant