Commit 119c8927 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Benjamin Berg

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.
parent e518aaae
Pipeline #108367 passed with stages
in 4 minutes and 24 seconds
......@@ -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
......
......@@ -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@
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment