fix: install the user units where systemd will find them

A build with a prefix of its own put them in $(PREFIX)/lib/systemd/user, which
is right for /usr/local and wrong for the one prefix an install without root
can use: systemd searches $XDG_DATA_HOME/systemd/user and never
~/.local/lib/systemd/user. An install into ~/.local came out with a working
program whose watcher could not be enabled at all.

They go under share now, which both a system prefix and a home one are
searched for. Nothing changes for the packages - the deb and the rpm pass
USERUNITDIR in themselves.

That prefix is what an atomic distribution leaves a user, so the readme says
how to install on Bazzite: layer the rpm and reboot, or put the whole thing in
$HOME, which is where everything it writes ends up anyway.
This commit is contained in:
Felitendo committed 2026-09-08 13:38:39 +02:00
1 parent 004094ef78
commit e09b145f3a
2 files changed
+26 -4

No files matched your search

+18
View File
@@ -67,6 +67,24 @@ sudo curl -fsSL -o /etc/yum.repos.d/middleclick-autoscroll.repo \
sudo dnf install middleclick-autoscroll
```
**Bazzite and friends (for the ones who reboot to install things)**
```bash
sudo curl -fsSL -o /etc/yum.repos.d/middleclick-autoscroll.repo \
https://felitendo.github.io/middleclick-autoscroll/middleclick-autoscroll.repo
sudo rpm-ostree install middleclick-autoscroll
systemctl reboot
```
Don't want to layer a shell script into your image? Everything this thing does
happens in `$HOME` anyway, so it can just live there too - no root, no reboot
(needs `make`, otherwise grab it in a distrobox):
```bash
git clone https://github.com/Felitendo/middleclick-autoscroll
cd middleclick-autoscroll && make install PREFIX=~/.local
```
**Debian (for the elderly)**
```bash