From 577f69313f6c16a9e172cdd9e3dd2a46030de6cb Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 13 Jun 2018 12:21:49 +0200 Subject: [PATCH] Fix tigervnc systemd unit file Resolves: bz#1583159 --- tigervnc.spec | 6 +++++- vncserver.service | 16 ++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/tigervnc.spec b/tigervnc.spec index fa27973..db8a7ad 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -1,6 +1,6 @@ Name: tigervnc Version: 1.8.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A TigerVNC remote display system %global _hardened_build 1 @@ -321,6 +321,10 @@ install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/10-libvnc.c %{_datadir}/icons/hicolor/*/apps/* %changelog +* Wed Jun 13 2018 Jan Grulich - 1.8.0-10 +- Fix tigervnc systemd unit file + Resolves: bz#1583159 + * Wed Jun 06 2018 Adam Jackson - 1.8.0-9 - Fix GLX initialization with 1.20 diff --git a/vncserver.service b/vncserver.service index 5077e82..2b8204b 100644 --- a/vncserver.service +++ b/vncserver.service @@ -4,8 +4,6 @@ # 1. Copy this file to /etc/systemd/system/vncserver@.service # 2. Replace with the actual user name and edit vncserver # parameters appropriately -# (ExecStart=/usr/sbin/runuser -l -c "/usr/bin/vncserver %i" -# PIDFile=/home//.vnc/%H%i.pid) # 3. Run `systemctl daemon-reload` # 4. Run `systemctl enable vncserver@:.service` # @@ -37,12 +35,18 @@ After=syslog.target network.target [Service] Type=forking +WorkingDirectory=/home/ +User= +Group= -# Clean any existing files in /tmp/.X11-unix environment -ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' -ExecStart=/usr/sbin/runuser -l -c "/usr/bin/vncserver %i" PIDFile=/home//.vnc/%H%i.pid -ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' + +ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' +ExecStart=/usr/bin/vncserver -autokill %i +ExecStop=/usr/bin/vncserver -kill %i + +Restart=on-success +RestartSec=15 [Install] WantedBy=multi-user.target