Fix Ubuntu/Debian install: add ydotoold dep, correct set-key docs#9
Open
jguice wants to merge 2 commits into
Open
Fix Ubuntu/Debian install: add ydotoold dep, correct set-key docs#9jguice wants to merge 2 commits into
jguice wants to merge 2 commits into
Conversation
On Debian/Ubuntu the ydotool client and ydotoold daemon ship as separate packages. Without the daemon installed and running, utter's keystroke injection silently fails — the postinstall systemctl enable of ydotool.service errors with "Unit file ydotool.service does not exist" because no ydotoold is present to provide it. Fedora/RHEL bundle both in a single ydotool package, so this only needs to apply to the deb build. Also fix install-release.sh's final message: it told users to `systemctl --user edit utter-watcher` and override ExecStart to change the PTT key, which is the manual systemd path. The supported flow is `utter set-key` — the watcher restarts itself and the change persists via the config file rather than a unit drop-in.
Adding ydotoold to deps (previous commit) gets the daemon installed but doesn't help on Debian/Ubuntu, where the ydotoold package strips the systemd unit. The postinstall's `systemctl enable ydotool.service` then fails with "Unit file ydotool.service does not exist" and ydotoold never starts. Ship a minimal base unit ourselves on deb only (Fedora's ydotool package already provides one — shipping ours there would conflict). The existing ydotool.service.d/owner.conf drop-in keeps working unchanged. Add the installing user to the `input` group as a permission fallback. The shipped udev rule grants ACL access via systemd-logind's `uaccess` tag — preferred when it works, since it scopes access to the active seat — but it silently does nothing in some session configurations (no local seat, certain compositor setups, headless installs). Group membership requires a re-login but is reliable. Trigger udev with `--action=change` so logind re-evaluates ACLs on already-plugged devices instead of only firing on new adds. Postinstall message now also tells users to run `utter set-key` to change the PTT key, matching install-release.sh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related fixes for the Linux install path on Debian/Ubuntu, found while installing on Ubuntu 24.04:
ydotooldto the deb dependency list. Ubuntu/Debian split theydotoolpackage into two: the CLI (ydotool) and the daemon (ydotoold). utter shells out to the CLI (src/main.rs:737), which then talks to the daemon over a Unix socket — so withoutydotooldinstalled and running, keystroke injection silently does nothing. Symptom on a fresh install: postinstall fails to enableydotool.service("Unit file ydotool.service does not exist") because the unit file ships in theydotooldpackage, notydotool. Fedora/RHEL bundle both into a singleydotoolpackage, so this only applies to the deb build (added tooverrides.deb.dependsonly).scripts/install-release.sh. The final post-install message told users tosystemctl --user edit utter-watcherand manually overrideExecStartwith--key …. That's the raw-systemd path; the supported flow isutter set-key, which captures the next physical key, persists it to the config file, and restarts the watcher automatically — matching what the README already documents.Also: tightened the dep comment at the top of
install-release.shto call out thatydotooldis a Debian/Ubuntu-only extra.Test plan
apt installon a clean Ubuntu 24.04 →ydotooldis pulled in,ydotool.serviceenables and starts, postinstall completes without warnings.dnf installon a clean Fedora → unchanged behavior,ydotoolpackage alone provides both binaries.install-release.shend-to-end on Ubuntu → final message points atutter set-keyand the workflow actually works.