Hello Guix,

How would Guix/Shepherd implement the XDG Autostart specification[1]?

I looked into how systemd does it[2], and it appears that implementation is done by having a service generate other services based on the .desktop files in the correct directory. Is an `autostart-service-generator-service-type` possible in this way? Or, perhaps the most rudimentary implementation would be a service that just runs `dex -a` once a session is started.

On that note, a prerequisite to correct behavior for autostarts seems to be a service (or other mechanism) that starts and stops with a graphical session, so that the applications don't launch and fail (or get into some weird state) before the graphical session is ready or end up hindering the process of ending a graphical session. Systemd does this with `graphical-session.target`, somehow. (I think this stackoverflow answer[3] implies that `graphical-session.target` is launched when the services for specific graphical sessions are launched--but how are those launched?) Anyways, shepherd does not have to be simply an implementation of ANSI systemd. Perhaps we could bind a service to a session by wrapping the `Exec=` call in the session's .desktop file?

Let me know your ideas,

Andrew

[1] https://specifications.freedesktop.org/autostart-spec/latest/

[2]https://systemd.io/DESKTOP_ENVIRONMENTS/#xdg-autostart-integration

[3] https://unix.stackexchange.com/questions/787236/how-exactly-does-graphical-session-target-start-or-get-started


Reply via email to