[systemd-devel] Standardizing names for graphical session units
Martin Pitt
martin.pitt at ubuntu.com
Tue Jul 5 06:43:18 UTC 2016
Hello Zbigniew,
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.
That sounds good to me, and indeed targets sound like a more natural
way than slices.
> > * You have to pre-define them, so we would need to have on-disk
> > units for all session types like graphical-xfce.target,
> > graphical-gnome.target, etc.
>
> I don't think this is such a big problem. After all it's going to be
> a few (3? 5?) units, and a file is needed to provide Description=
> and Documentation= anyway.
Agreed.
> I have to agree with Jóhann that "graphical-" part does not seem necessary.
> I'd rather go for "kde-session.target", "gnome-session.target", etc.
As predicted, let the bikeshedding begin. :-) I really don't mind
much if we call it graphical-$TYPE.target or $TYPE-session.target.
> And I don't think that the requirement for a unit file is a hurdle
> for step-wise conversion. Once you want to convert, let's say, xfce,
> you create xfce-session.target with some Description, and start linking
> units to it through .wants or .requires dirs, and that's totally
> independent of any other session.
Right. The hurdle I meant was that right now every distro or
home-grown solution calls the units differently. I. e. so far we had
X11@$DISPLAY, graphical-$TYPE.slice, and now $TYPE-session.target. If
this becomes a "first submitter wins" then we might miss improvements
like the above for a nicer design.
Thanks for your input, this is a nice idea! Let's hear a few more
opinions before jumping to the implementation (of DependenciesPartOf=
in particular).
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the systemd-devel
mailing list