This is fine, but can you note how you know that a unit is driven by gnome-session?
Can you give me a bit more context here? When would a packager be dealing with a unit that is expected to be managed by gnome-session but not know that this is the case?
Because anyone can deliver a systemd unit that would be activated by gnome-session. It basically replaces the xdg-autostart mechanism for early session start services.
Hmm, I'm not sure about this.
I don't think this stuff is supposed to replace the xdg-autostart machinery, but rather the bits that were previously covered by the /usr/share/gnome-session/sessions/*.session files.
/usr/share/gnome-session/sessions/*.session
If you're not shipping something explicitly intended to be a "gnome-session plumbing unit", then I think you'd want to just use standard systemd or xdg-autostart semantics.
So, altogether now, still not sure what changes I should make here :sweat_smile:
I don't get the impression that user units replacing $HOME/.config/autostart/ files, the ones that now live in /usr/lib/systemd/user/, are the ones @samcday is referring to here.
$HOME/.config/autostart/
/usr/lib/systemd/user/
But I'm not clear, either, on which units the new text is referring to, if not those.
The DBus-activated units created when services in /usr/share/dbus-1/services/ are started for the session? (Like these?)
/usr/share/dbus-1/services/
$ systemctl --user |grep -E '^ dbus.*\.service'|head -n4 dbus-:1.3-org.freedesktop.portal.IBus@0.service loaded active running dbus-:1.3-org.freedesktop.portal.IBus@0.service dbus-:1.3-org.freedesktop.problems.applet@0.service loaded active running dbus-:1.3-org.freedesktop.problems.applet@0.service dbus-:1.3-org.gnome.GConf@0.service loaded active running dbus-:1.3-org.gnome.GConf@0.service dbus-:1.3-org.gnome.Identity@0.service loaded active running dbus-:1.3-org.gnome.Identity@0.service
It can't be the dependencies of the gnome-session-*.target units, because every process running in the user session (that's managed by systemd) ends up as a dependency of e.g. gnome-session-manager.target.
gnome-session-*.target
gnome-session-manager.target
There are the org.gnome.SettingsDaemon.* targets, and the corresponding single .service units each one has... those are all direct dependencies of gnome-session@gnome.target... but so are things like gnome-software.service, evolution-alarm-notify.service, etc. that are $HOME/.config/autostart (or /etc/xdg/autostart/) replacement units.
org.gnome.SettingsDaemon.*
.service
gnome-session@gnome.target
gnome-software.service
evolution-alarm-notify.service
$HOME/.config/autostart
/etc/xdg/autostart/
(I mention the dbus-* units as an interesting case, because those are some of the few that don't exist as files in /usr/lib/systemd/user/, they're entirely dynamically created at runtime. Even the org.gnome.SettingsDaemon.* units all have corresponding /usr/lib/systemd/user/ files driving them. But the D-Bus services are entirely defined by their /usr/share/dbus-1/service/ files.)
dbus-*
/usr/share/dbus-1/service/
DBus-activated services are different again from what we're discussing here. We're also not talking about autostart files. We're only talking about the session components that were previously defined in *.session files driven by gnome-session.
*.session
gnome-session
I noticed a comment you shared that seems to have since been deleted where you seemed to find the right units, and then wondered aloud if it's just those files (answer: not quite, Phosh also spawns its session with the aid of gnome-session, as does phrog).
phrog