Commit Graph

5 Commits

Author SHA1 Message Date
Hans Ulrich Niedermann
d263f5731c Clarify comments on ConditionEnvironment placement
Clarify the comments on ConditionEnvironment= by mentioning that a
ConditionEnvironment= line must be located in the [Unit] section.

The comments suggesting using ConditionEnvironment= themselves are
in the [Service] section, which implicitly and wrongly suggests
that ConditionEnvironment= could be defined right there as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1472>
2020-12-09 15:08:15 +00:00
Hans Ulrich Niedermann
38d642541c Correct the systemd version required for ConditionEnvironment=
According to systemd's NEWS file, the ConditionEnvironment= setting
has only been introduced in systemd 246, not in 245 like the comment
in the services files claimed.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1472#note_942075

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1472>
2020-12-09 15:08:15 +00:00
Benjamin Berg
56b6e65317 data: Only unset environment when the service actually ran
ExecStopPost= is executed even if ExecCondition= fails. As such, we need
to add a guard as we would otherwise clear environment variables on X11
sessions (rendering them utterly useless).

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1418
2020-08-20 08:11:11 +00:00
Benjamin Berg
b689b35b7d data: Place the shell into session.slice when using systemd
This way we conform more to https://systemd.io/DESKTOP_ENVIRONMENTS

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/895
2020-07-31 13:53:31 +00:00
Benjamin Berg
41d5b1455f data: Create generic org.gnome.Shell.target
Move the GNOME shell service file adapation for x11/wayland into the
target/service files. This means that the session definition can simply
pull in org.gnome.Shell.target, without having to care about whether it
is starting an X11 or wayland session.

Note that this currently requires fork'ing to do the test. This will
however not be needed in the long term when ConditionEnvironment becomes
available (see https://github.com/systemd/systemd/pull/15817).

We technically do not need to use template units. But doing so means
that the unit can be translated to the app id more easily (though it is
not yet completely clear how this should look like in the long term).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/895
2020-07-31 13:53:31 +00:00