[gnome-terminal] server: Add a systemd user service
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] server: Add a systemd user service
- Date: Fri, 15 Apr 2016 16:33:07 +0000 (UTC)
commit 4f34660f0d1e7a61eaed6123d314a69664a7adeb
Author: Simon McVittie <smcv debian org>
Date: Fri Apr 15 18:32:30 2016 +0200
server: Add a systemd user service
This is used to implement the D-Bus session service if
"dbus-daemon --session" was configured to use systemd activation,
most commonly via the units installed by configuring dbus 1.10+
with --enable-user-session.
With this service, child processes such as the user's shell
end up in the cgroup …/user UID service/org.gnome.Terminal.service
instead of in …/user UID service/dbus.service.
Use KillMode=process so systemd doesn't kill screen sessions,
backgrounded programmes etc.
https://bugzilla.gnome.org/show_bug.cgi?id=759115
configure.ac | 1 +
src/Makefile.am | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8a24172..0ef1bb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ fi
AM_MAINTAINER_MODE([enable])
PKG_PROG_PKG_CONFIG
+AC_PROG_MKDIR_P
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
diff --git a/src/Makefile.am b/src/Makefile.am
index 17f55e9..aa63b7b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,6 +16,11 @@ endif # WITH_NAUTILUS_EXTENSION
dbusservice_DATA = org.gnome.Terminal.service
+# It is correct for this to be in ${prefix}/lib, even on systems where that
+# does not match ${libdir}. This is what systemd uses on such platforms.
+systemduserdir = $(prefix)/lib/systemd/user
+nodist_systemduser_DATA = gnome-terminal-server.service
+
gnome_terminal_server_built = \
terminal-marshal.c \
terminal-marshal.h \
@@ -140,8 +145,18 @@ terminal-marshal.c: $(srcdir)/terminal-marshal.list
org.gnome.Terminal.service: Makefile
$(AM_V_GEN) ( echo "[D-BUS Service]"; \
echo "Name=org.gnome.Terminal"; \
+ echo "SystemdService=gnome-terminal-server.service"; \
echo "Exec=${libexecdir}/gnome-terminal-server") > $@
+gnome-terminal-server.service: Makefile
+ $(AM_V_GEN) ( echo "[Unit]"; \
+ echo "Description=GNOME Terminal Server"; \
+ echo "[Service]"; \
+ echo "KillMode=process"; \
+ echo "Type=dbus"; \
+ echo "BusName=org.gnome.Terminal"; \
+ echo "ExecStart=${libexecdir}/gnome-terminal-server") > $@
+
terminal-gdbus-generated.c terminal-gdbus-generated.h: org.gnome.Terminal.xml Makefile
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix=org.gnome.Terminal \
@@ -396,6 +411,7 @@ CLEANFILES = \
gnome-terminal.schemas \
stamp-terminal-type-builtins.h \
org.gnome.Terminal.service \
+ gnome-terminal-server.service \
$(BUILT_SOURCES)
EXTRA_DIST = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]