[systemd-devel] Q: What is the correct way to use `xdg-desktop-autostart.target` with window managers?
WieeRd
verywieerd at gmail.com
Fri Jul 19 13:52:25 UTC 2024
I'm trying to use systemd as a XDG Autostart manager for WMs that does not
provide builtin support for autostart entries. At first, I simply tried to
`systemctl --user start` the target inside the window manager. However, it
quickly turned out that the target cannot and not meant to be manually
started and instead should be specified as a `Wants=` dependency.
But how exactly?
1. Which unit should be linked to the autostart target as `Wants=`
dependency?
Should the user / WM author create / provide another user unit just so
that it can pull in the autostart target?
2. Looking at the source code, it seems that `OnlyShowIn=` detection relies
on the $XDG_CURRENT_DESKTOP environment.
Whose responsibility is it to set this variable? Display manager? Window
manager? Or by the user?
The man pages of `systemd.special` and `systemd-xdg-autostart-generator`
were the only documentations I could find about this feature, and I'm still
not sure what I'm supposed to do.
Thanks in advance for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240719/8979def3/attachment.htm>
More information about the systemd-devel
mailing list