diff --git a/SOURCES/vncserver b/SOURCES/vncserver
index bd2f422..6ba55d5 100644
--- a/SOURCES/vncserver
+++ b/SOURCES/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".
diff --git a/SPECS/tigervnc.spec b/SPECS/tigervnc.spec
index 4a61786..3a6681f 100644
--- a/SPECS/tigervnc.spec
+++ b/SPECS/tigervnc.spec
@@ -5,7 +5,7 @@
 
 Name:           tigervnc
 Version:        1.11.0
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        A TigerVNC remote display system
 
 %global _hardened_build 1
@@ -347,6 +347,10 @@ fi
 %ghost %verify(not md5 size mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename}
 
 %changelog
+* Mon Jul 19 2021 Jan Grulich <jgrulich@redhat.com> - 1.11.0-9
+- Fix logout from VNC session using vncserver
+  Resolves: bz#1983706
+
 * Tue Jun 01 2021 Jan Grulich <jgrulich@redhat.com> - 1.11.0-8
 - Run all SELinux RPM macros on correct package
   Resolves: bz#1907963