From c92fcc4f4375b0aebc5919311bbf703138b21918 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 25 Jul 2016 22:01:35 +0200 Subject: units: add graphical-session.target user unit (#3678) This unit acts as a dynamic "alias" target for any concrete graphical user session like gnome-session.target; these should declare "BindsTo=graphical-session.target" so that both targets stop and start at the same time. This allows services that run in a particular graphical user session (e. g. gnome-settings-daemon.service) to declare "PartOf=graphical-session.target" without having to know or get updated for all/new session types. This will ensure that stopping the graphical session will stop all services which are associated to it. --- units/user/graphical-session.target | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 units/user/graphical-session.target (limited to 'units') diff --git a/units/user/graphical-session.target b/units/user/graphical-session.target new file mode 100644 index 0000000000..00d16230b7 --- /dev/null +++ b/units/user/graphical-session.target @@ -0,0 +1,13 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Current graphical user session +Documentation=man:systemd.special(7) +Requires=basic.target +RefuseManualStart=yes +StopWhenUnneeded=yes -- cgit v1.2.3-54-g00ecf