[systemd-devel] Standardizing names for graphical session units -- version 2
Andrei Borzenkov
arvidjaar at gmail.com
Wed Jul 6 11:44:15 UTC 2016
On Wed, Jul 6, 2016 at 2:25 PM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> $ cat .config/systemd/user/gnome-session.target
> [Unit]
> Description=User systemd services for GNOME graphical session
> Requires=graphical.target
> PartOf=graphical.target
>
Is not this redundant? Requires=graphical.target already stops
gnome-session.target when graphical.target is stopped (by any mean).
...
> The only glitch is that "systemctl --user stop gnome-session.target"
> only stops that target itself. I would have expected it to stop
> graphical.target too (and someapp along with it), as it has
> PartOf=graphical.target. This might be a bug in systemd, or some
> semantics of PartOf with targets that I don't understand.
You probably do not understand. If foo.service is PartOf=bar.target,
then stopping bar.target stops foo.service. State of foo.service
itself has no impact of bar.target.
More information about the systemd-devel
mailing list