From d14f71fb0433fe7044d7b8eb17507a3d4d7a5f35 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 19 Jul 2021 19:06:45 +0200 Subject: [PATCH] Fix logout from VNC session using vncserver Resolves: bz#1983704 --- tigervnc.spec | 6 +++++- vncserver | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tigervnc.spec b/tigervnc.spec index 39ea181..7bb7cb4 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -5,7 +5,7 @@ Name: tigervnc Version: 1.11.0 -Release: 16%{?dist} +Release: 17%{?dist} Summary: A TigerVNC remote display system %global _hardened_build 1 @@ -360,6 +360,10 @@ fi %ghost %verify(not md5 size mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} %changelog +* Mon Jul 19 2021 Jan Grulich - 1.11.0-17 +- Fix logout from VNC session using vncserver + Resolves: bz#1983704 + * Tue Jun 01 2021 Jan Grulich - 1.11.0-16 - Bump version for rebuild (binutils) Resolves: bz#1961488 diff --git a/vncserver b/vncserver index 787c9a8..0faa24f 100644 --- a/vncserver +++ b/vncserver @@ -60,7 +60,14 @@ $defaultXStartup = ("#!/bin/sh\n\n". "unset SESSION_MANAGER\n". "unset DBUS_SESSION_BUS_ADDRESS\n". - "exec /etc/X11/xinit/xinitrc\n"); + "/etc/X11/xinit/xinitrc\n". + "# Assume either Gnome will be started by default when installed\n". + "# We want to kill the session automatically in this case when user logs out. In case you modify\n". + "# /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should\n". + "# be responsible to modify below code to avoid that your session will be automatically killed\n". + "if [ -e /usr/bin/gnome-session ]; then\n". + " vncserver -kill \$DISPLAY\n". + "fi\n"); $defaultConfig = ("## Supported server options to pass to vncserver upon invocation can be listed\n".