[gnome-settings-daemon/gnome-3-34] xsettings: Make it able to run on demand



commit 3f6e81c81902bf00a6c659c966e9dcea5b51d7aa
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 15 13:14:30 2019 +0200

    xsettings: Make it able to run on demand
    
    There's some changes in how this service is started:
    - Instead of it being part of the gnome-session target initialization
      chain, it now depends on a new gnome-session-x11-services target.
      Initialization of this target is left up in the air here, and may
      happen during startup or at any random point during the running
      session. The same analogous behavior will be seen at shutdown.
    - The Restart condition has been softened to on-abnormal, as unclean
      exits are somewhat unavoidable on Xwayland restart scenarios. Other
      crashes or abnormal signals should still be intercepted as usual,
      and lead to the fail whale.

 plugins/meson.build                        | 8 ++++++--
 plugins/xsettings/gsd-xsettings.service.in | 3 +--
 plugins/xsettings/gsd-xsettings.target.in  | 8 +++-----
 3 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/plugins/meson.build b/plugins/meson.build
index 547e8bdb..a01017af 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -34,8 +34,8 @@ if enable_wwan
 endif
 
 plugin_install_extra_wants = {
+  'xsettings': ['gnome-session-x11-services.target.wants/'],
 #  'dummy': ['required-started.target.wants/'],
-#  'xsettings': ['gnome-session-x11.target.wants/'],
 #  'wacom': ['wacom.target.wants/'],
 #  'smartcard': ['smartcard.target.wants/'],
 }
@@ -107,7 +107,11 @@ foreach plugin: enabled_plugins_file
         install_dir: systemd_userunitdir
      )
 
-     wants = ['gnome-session-initialized.target.wants/']
+     wants = []
+     if plugin_name != 'xsettings'
+       wants += ['gnome-session-initialized.target.wants/']
+     endif
+
      if plugin_name in plugin_install_extra_wants
        wants += [plugin_install_extra_wants[plugin_name]]
      endif
diff --git a/plugins/xsettings/gsd-xsettings.service.in b/plugins/xsettings/gsd-xsettings.service.in
index e644c541..d91c2fa4 100644
--- a/plugins/xsettings/gsd-xsettings.service.in
+++ b/plugins/xsettings/gsd-xsettings.service.in
@@ -9,10 +9,9 @@ RefuseManualStart=true
 RefuseManualStop=true
 
 PartOf=gsd-xsettings.target
-After=gnome-session-initialized.target
 
 [Service]
 Type=dbus
 ExecStart=@libexecdir@/gsd-xsettings
-Restart=on-failure
+Restart=on-abnormal
 BusName=@plugin_dbus_name@
diff --git a/plugins/xsettings/gsd-xsettings.target.in b/plugins/xsettings/gsd-xsettings.target.in
index 019c5719..f46f2649 100644
--- a/plugins/xsettings/gsd-xsettings.target.in
+++ b/plugins/xsettings/gsd-xsettings.target.in
@@ -9,8 +9,6 @@ After=gnome-session-initialized.target
 PartOf=gnome-session-initialized.target
 Before=gnome-session.target
 
-# Use something similar once appropriate an appropriate target exists for X11
-#Requisite=gnome-session-x11.target
-#After=gnome-session-x11.target
-#PartOf=gnome-session-x11.target
-# When done, also add the target to the meson.build file!
+Requisite=gnome-session-x11-services.target
+After=gnome-session-x11-services.target
+PartOf=gnome-session-x11-services.target


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]