dex
dex copied to clipboard
Running individual autostart entries via systemd
Hi! I've been thinking a bit about dex+systemd integration, and I've a kind-of-proposal, but would like to hear your thoughts before hacking into it. The idea is basically:
- Ship a
[email protected]file which has something likeExecStart=/usr/bin/dex run %I. dex run $NAMEwill merely run$NAME.desktop. Just one entry though, not all of them.- A user can run
systemctl --user enable [email protected].
Note that dex run is very very similar to dex -w, but takes only the basename instead of the full path (e.g.: caffeine instead of /etc/xdg/autostart/caffeine.desktop).
The end result is being able to run autostart-desktop entries with three benefits:
- Entries must be explicitly enabled by the user (the XDG spec is highly flawed IMHO in that applications decide if they autostart, not the user).
- They run as a systemd service, so get managed/restarted properly and all that. I personally have a statusbar indicator if any service transitions into a failed state.
- There's no need to re-write autostart desktop entries as systemd-services
As a bonus point, something like dex enable $NAME that runs systemctl --user enable dex@$NAME.service might be interesting, though this is a bit systemd-centric, and, so far, it seems that dex is very systemd-agnostic, which is probably important for a lot of users.
What are you thoughts on this?