From 98d2d46876c08d6f2ae63284ec5a28f90cbbb8ac Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 2 Aug 2016 14:56:45 +0200 Subject: [PATCH] units: add graphical-session-pre.target user unit (#3848) This complements graphical-session.target for services which set up the environment (e. g. dbus-update-activation-environment) and need to run before the actual graphical session. --- Makefile.am | 3 ++- man/systemd.special.xml | 13 +++++++++++++ units/user/graphical-session-pre.target | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 units/user/graphical-session-pre.target diff --git a/Makefile.am b/Makefile.am index 7dd021b56ac..763b16289dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -574,7 +574,8 @@ dist_userunit_DATA = \ units/user/basic.target \ units/user/default.target \ units/user/exit.target \ - units/user/graphical-session.target + units/user/graphical-session.target \ + units/user/graphical-session-pre.target nodist_userunit_DATA = \ units/user/systemd-exit.service diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 18142598cbd..d977298cd8c 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -927,6 +927,19 @@ PartOf=graphical-session.target + + + graphical-session-pre.target + + This target contains services which set up the environment or + global configuration of a graphical session, such as SSH/GPG agents + (which need to export an environment variable into all desktop processes) + or migration of obsolete d-conf keys after an OS upgrade (which needs to + happen before starting any process that might use them). This target must + be started before starting a graphical session + like gnome-session.target. + + diff --git a/units/user/graphical-session-pre.target b/units/user/graphical-session-pre.target new file mode 100644 index 00000000000..86d15aff33a --- /dev/null +++ b/units/user/graphical-session-pre.target @@ -0,0 +1,14 @@ +# 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=Session services which should run early before the graphical session is brought up +Documentation=man:systemd.special(7) +Requires=basic.target +Before=graphical-session.target +RefuseManualStart=yes +StopWhenUnneeded=yes -- 2.39.5