[gnome-session/benzea/systemd-new-session-config] data: Configure session using a drop-in
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/benzea/systemd-new-session-config] data: Configure session using a drop-in
- Date: Mon, 13 Jul 2020 15:07:18 +0000 (UTC)
commit 87258f4fc83f276c0a3b717d5421c0ddd5d51391
Author: Benjamin Berg <bberg redhat com>
Date: Tue Dec 10 16:42:13 2019 +0100
data: Configure session using a drop-in
During the GNOME 3.34 times when systemd support was still added, all
the session components pulled in themselves or were explicitly pulled by
GNOME session. However, doing this makes it really hard to create a
custom session or to modify the existing sessions in some way.
Change things so that we pull in all the dependencies for each session
type independently. This works using a drop-in for the
gnome-session@.target and all GNOME session users will need to provide
such a drop-in or pass --builtin to gnome-session.
data/gnome-session-wayland.target | 4 ----
data/gnome-session-x11.target | 4 ----
data/gnome.session.conf | 19 +++++++++++++++++++
data/gnome.session.desktop.in.in | 1 +
data/meson.build | 6 ++++++
5 files changed, 26 insertions(+), 8 deletions(-)
---
diff --git a/data/gnome-session-wayland.target b/data/gnome-session-wayland.target
index a0f18517..29f95c54 100644
--- a/data/gnome-session-wayland.target
+++ b/data/gnome-session-wayland.target
@@ -8,7 +8,3 @@ Before=gnome-session.target
PartOf=graphical-session.target
RefuseManualStart=yes
RefuseManualStop=yes
-
-# Always pull in the correct gnome-shell target
-BindsTo=gnome-shell-wayland.target
-After=gnome-shell-wayland.target
diff --git a/data/gnome-session-x11.target b/data/gnome-session-x11.target
index 3c0c18ef..67dec0f0 100644
--- a/data/gnome-session-x11.target
+++ b/data/gnome-session-x11.target
@@ -11,7 +11,3 @@ RefuseManualStop=yes
# Pull in all X11-specific services the session might depend on
Requires=gnome-session-x11-services.target
-
-# Always pull in the correct gnome-shell target
-BindsTo=gnome-shell-x11.target
-After=gnome-shell-x11.target
diff --git a/data/gnome.session.conf b/data/gnome.session.conf
new file mode 100644
index 00000000..f741b158
--- /dev/null
+++ b/data/gnome.session.conf
@@ -0,0 +1,19 @@
+[Unit]
+# Keep in sync with gnome.session
+Wants=org.gnome.SettingsDaemon.A11ySettings.target
+Wants=org.gnome.SettingsDaemon.Color.target
+Wants=org.gnome.SettingsDaemon.Datetime.target
+Wants=org.gnome.SettingsDaemon.Housekeeping.target
+Wants=org.gnome.SettingsDaemon.Keyboard.target
+Wants=org.gnome.SettingsDaemon.MediaKeys.target
+Wants=org.gnome.SettingsDaemon.Power.target
+Wants=org.gnome.SettingsDaemon.PrintNotifications.target
+Wants=org.gnome.SettingsDaemon.Rfkill.target
+Wants=org.gnome.SettingsDaemon.ScreensaverProxy.target
+Wants=org.gnome.SettingsDaemon.Sharing.target
+Wants=org.gnome.SettingsDaemon.Smartcard.target
+Wants=org.gnome.SettingsDaemon.Sound.target
+Wants=org.gnome.SettingsDaemon.UsbProtection.target
+Wants=org.gnome.SettingsDaemon.Wacom.target
+
+Requires=org.gnome.Shell.target
diff --git a/data/gnome.session.desktop.in.in b/data/gnome.session.desktop.in.in
index 6c70f540..f3aaabce 100644
--- a/data/gnome.session.desktop.in.in
+++ b/data/gnome.session.desktop.in.in
@@ -1,3 +1,4 @@
[GNOME Session]
Name=GNOME
+# Keep in sync with gnome-session@gnome.target.d/session.conf drop-in
RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.UsbProtection;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;
diff --git a/data/meson.build b/data/meson.build
index abf44957..2cc62cd0 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -132,6 +132,12 @@ if enable_systemd_session
rename: 'override.conf',
install_dir : join_paths(systemd_userunitdir, 'gnome-launched-.scope.d')
)
+
+ install_data(
+ 'gnome.session.conf',
+ rename: join_paths('gnome-session@gnome.target.d', 'session.conf'),
+ install_dir: systemd_userunitdir,
+ )
endif
data = files('hardware-compatibility')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]