#993314 user-level systemd unit?

Package:
autorandr
Source:
autorandr
Submitter:
Antoine Beaupre
Date:
2023-05-02 14:33:04 UTC
Severity:
wishlist
Tags:
#993314#5
Date:
2021-08-30 15:46:16 UTC
From:
To:
Would it be possible to ship a user-level systemd unit for this? For
some reason, the xdg autostart thing doesn't work here, although I
admit I have a somewhat weird session setup (old-school xsession setup
which starts i3 and other things).

I have tried with the following `.service` file, which needs to be
different from the "system" level one.

```
[Unit]
After=graphical-session.target
Description=autorandr execution hook
# Note: StartLimitInterval was renamed to StartLimitIntervalSec in systemd-230.
# See autorandr bug #69. Do not rename for now, as the old name is kept for
# compatibility.
StartLimitInterval=5
StartLimitBurst=1

[Service]
ExecStart=/usr/bin/autorandr --change --default default
Type=oneshot
RemainAfterExit=false

[Install]
WantedBy=graphical-session.target
```

Let me know how that works for you!

#993314#10
Date:
2023-04-28 23:31:50 UTC
From:
To:
You should be able to enable the system-wide unit for a user by using
something like the following:

   systemctl --user enable /lib/systemd/system/autorandr.service

That said, the system-wide one is supposed to work.

Can you give some details on why autorandr --batch might not be working
for your setup? [It works for mine, though I am using xdm with .xsession
instead of startx or whatever you're doing.]

Thanks!

#993314#17
Date:
2023-05-02 14:30:43 UTC
From:
To:
Hi!

Sorry, I switched to sway/wayland and don't have much more information
to provide than what I already reported...

a.