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.
Carlos Garnacho authored 4 years ago
Benjamin Berg committed 4 years ago
33 | 33 |
endif
|
34 | 34 |
|
35 | 35 |
plugin_install_extra_wants = {
|
|
36 |
'xsettings': ['gnome-session-x11-services.target.wants/'],
|
36 | 37 |
# 'dummy': ['required-started.target.wants/'],
|
37 | |
# 'xsettings': ['gnome-session-x11.target.wants/'],
|
38 | 38 |
# 'wacom': ['wacom.target.wants/'],
|
39 | 39 |
# 'smartcard': ['smartcard.target.wants/'],
|
40 | 40 |
}
|
|
106 | 106 |
install_dir: systemd_userunitdir
|
107 | 107 |
)
|
108 | 108 |
|
109 | |
wants = ['gnome-session-initialized.target.wants/']
|
|
109 |
wants = []
|
|
110 |
if plugin_name != 'xsettings'
|
|
111 |
wants += ['gnome-session-initialized.target.wants/']
|
|
112 |
endif
|
|
113 |
|
110 | 114 |
if plugin_name in plugin_install_extra_wants
|
111 | 115 |
wants += [plugin_install_extra_wants[plugin_name]]
|
112 | 116 |
endif
|
8 | 8 |
RefuseManualStop=true
|
9 | 9 |
|
10 | 10 |
PartOf=gsd-xsettings.target
|
11 | |
After=gnome-session-initialized.target
|
12 | 11 |
|
13 | 12 |
[Service]
|
14 | 13 |
Type=dbus
|
15 | 14 |
ExecStart=@libexecdir@/gsd-xsettings
|
16 | |
Restart=on-failure
|
|
15 |
Restart=on-abnormal
|
17 | 16 |
BusName=@plugin_dbus_name@
|
8 | 8 |
PartOf=gnome-session-initialized.target
|
9 | 9 |
Before=gnome-session.target
|
10 | 10 |
|
11 | |
# Use something similar once appropriate an appropriate target exists for X11
|
12 | |
#Requisite=gnome-session-x11.target
|
13 | |
#After=gnome-session-x11.target
|
14 | |
#PartOf=gnome-session-x11.target
|
15 | |
# When done, also add the target to the meson.build file!
|
|
11 |
Requisite=gnome-session-x11-services.target
|
|
12 |
After=gnome-session-x11-services.target
|
|
13 |
PartOf=gnome-session-x11-services.target
|