[systemd-devel] Standardizing names for graphical session units
Andrei Borzenkov
arvidjaar at gmail.com
Thu Jul 7 08:39:08 UTC 2016
On Thu, Jul 7, 2016 at 11:27 AM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> Zbigniew Jędrzejewski-Szmek [2016-07-04 22:20 +0000]:
>> I think we should instead enhance target units to provide missing
>> functionality. The most important thing would be to have something
>> like PartOf, but more nicely configured. PartOf=graphical-kde.target
>> would do the trick, but it would need to be configured in each
>> unit separately, which would mean that we'd need to duplicate each
>> unit for each target, which is unacceptable. I don't see a nice
>> way to achieve this with the current set of options. What about
>> adding DependenciesPartOf=yes|no on the target unit, with "yes"
>> meaning that we automatically add PartOf= dependencies to any service
>> which has a Wants= or Requires= dependency to the target.
>
> This would still not be sufficient, AFAICS. The top-level targets will
> only have relatively few direct dependencies. Let's suppose
> gnome-session.target has
> "Requires=mutter.service gnome-settings-daemon.service"
> and mutter.service then has a "Wants=at-spi2.service". We still want
> to stop at-spi2.service together with the session.
>
> DependenciesPartOf=yes in gnome.target would not achieve that (or it
> would need to apply transitively, and to Wants= as well, which sounds
> quite strange). OTOH adding "PartOf=graphical-session.target" to all
> graphical session specific user services works fine and works with the
> existing systemd model and dependencies.
>
Do not we already have "session" concept in logind? Is not session
already stopped when user logs out?
More information about the systemd-devel
mailing list