Andrew Wong <wonga...@icloud.com> writes: > 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?)
For GNOME, GDM starts the GNOME (wayland or x11) desktop file which starts some gnome-session binary which starts the systemd services. > 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 Hi Andrew, This will be something I will have to do for the Shepherdification of GNOME session[1]. I think its a good idea to read the desktop files and generate the services automatically after the start of the graphical-session service. Some things are still blurry but we can figure it out. If you want to code that part, please let me know! Have a nice day, Noé [1] https://gitlab.gnome.org/noe/gnomeherd/-/tree/main/shepherd?ref_type=heads
signature.asc
Description: PGP signature