[gnome-shell/benzea/systemd-user-units: 1/4] data: Use new systemd unit layout
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/benzea/systemd-user-units: 1/4] data: Use new systemd unit layout
- Date: Wed, 24 Apr 2019 08:24:56 +0000 (UTC)
commit eae05bdb28eb424ec86233fda7e48ff77f333e90
Author: Benjamin Berg <bberg redhat com>
Date: Sat Apr 20 00:21:55 2019 +0200
data: Use new systemd unit layout
The existing units were never used as the corresponding support was
never merged. The new design does not currently use multiple separate
targets for wayland and Xorg sessions.
Note that this will likely change further in gnome-session and
gnome-shell should make use of this to modify the restart behaviour on
wayland.
data/gnome-shell-wayland.target | 5 -----
data/gnome-shell-x11.target | 5 -----
data/gnome-shell.service.in | 27 +++++++++++++++++++++++----
data/gnome-shell.target | 8 ++++++++
data/meson.build | 3 +--
5 files changed, 32 insertions(+), 16 deletions(-)
---
diff --git a/data/gnome-shell.service.in b/data/gnome-shell.service.in
index ee275fa0e..4e141a70d 100644
--- a/data/gnome-shell.service.in
+++ b/data/gnome-shell.service.in
@@ -1,11 +1,30 @@
[Unit]
Description=GNOME Shell
-Wants=gnome-session.service
-After=graphical-session-pre.target gnome-session-bus.target
-PartOf=graphical-session.target
+RefuseManualStart=true
+
+Requisite=gnome-session-manager.target
+After=gnome-session-manager.target
+
+Requisite=gnome-session-initialized.target
+Before=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+
+Before=gnome-session.target
+
+# Limit startup frequency (see comment below)
+StartLimitIntervalSec=15s
+StartLimitBurst=1
[Service]
Type=dbus
ExecStart=@bindir@/gnome-shell
-Restart=on-failure
+# XXX: On X11 we want to restart on-success (Alt+F2 + r) and on-failure
+# while on wayland we cannot restart properly.
+# Maybe a good approach would be to disable extensions if the shell
+# fails in the first minute or so after logon. i.e. we define a
+# gnome-session-stable.target which is reached after a timeout (simple
+# unit that sleeps) and Requisite on that in the disable handler.
+Restart=always
+# Do not wait 100ms and limit restarting more than usual
+RestartSec=0ms
BusName=org.gnome.Shell
diff --git a/data/gnome-shell.target b/data/gnome-shell.target
new file mode 100644
index 000000000..3bdd466b5
--- /dev/null
+++ b/data/gnome-shell.target
@@ -0,0 +1,8 @@
+[Unit]
+Description=GNOME Shell
+DefaultDependencies=false
+
+BindsTo=gnome-shell.service
+After=gnome-shell.service
+
+Wants=gnome-shell-extensions-disabled-warning.service
diff --git a/data/meson.build b/data/meson.build
index 138aa3ef8..df47f4c88 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -111,8 +111,7 @@ if have_systemd
install_dir: systemd_userunitdir
)
- units = files('gnome-shell-wayland.target',
- 'gnome-shell-x11.target')
+ units = files('gnome-shell.target')
install_data(units, install_dir: systemd_userunitdir)
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]