VNC doesn't work after upgrade

Issues related to applications and software problems and general support
Post Reply
JeremyTourville
Posts: 7
Joined: 2019/01/29 15:40:52

VNC doesn't work after upgrade

Post by JeremyTourville » 2021/06/14 21:16:43

After performing a dnf/yum update on my system I am unable to connect via VNC.

cat /etc/redhat-release

Code: Select all

[code]CentOS Linux release 8.4.2105
rpm -qa | grep tigervnc

Code: Select all

tigervnc-server-1.11.0-6.el8.x86_64
tigervnc-selinux-1.11.0-6.el8.noarch
tigervnc-server-minimal-1.11.0-6.el8.x86_64
tigervnc-license-1.11.0-6.el8.noarch
Here are my settings for TigerVNC

cat /etc/tigervnc/vncserver.user

Code: Select all

# TigerVNC User assignment
#
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
#
# :2=andrew
# :3=lisa
:6=jeremyt
cat /etc/tigervnc/vncserver-config-defaults

Code: Select all

## Default settings for VNC servers started by the vncserver service
#
# Any settings given here will override the builtin defaults, but can
# also be overriden by ~/.vnc/config and vncserver-config-mandatory.
#
# See the following manpages for more details: vncserver(1) Xvnc(1)
#
# Several common settings are shown below. Uncomment and modify to your
# liking.

# securitytypes=vncauth,tlsvnc
# desktop=sandbox
# geometry=2000x1200
# localhost
# alwaysshared

# Default to GNOME session
# Note: change this only when you know what are you doing
session=gnome
cat /etc/tigervnc/vncserver-config-mandatory

Code: Select all

## Mandatory settings for VNC servers started by the vncserver service
#
# Any settings given here will override the builtin defaults and
# settings specified in ~/.vnc/config or vnc-config-defaults.
#
# See the following manpages for more details: vncserver(1) Xvnc(1)
#
# Several common settings are shown below. Uncomment and modify to your
# liking.

# securitytypes=vncauth,tlsvnc
# desktop=sandbox
# geometry=2000x1200
# localhost
# alwaysshared


I attempted to start the vncserver service for my user

systemctl enable vncserver@:6

Code: Select all

Created symlink /etc/systemd/system/multi-user.target.wants/vncserver@:6.service → /etc/systemd/system/vncserver@.service.
systemctl start vncserver@:6
systemctl status vncserver@:6

Code: Select all

● vncserver@:6.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Mon 2021-06-14 15:28:14 CDT; 24s ago
  Process: 197763 ExecStart=/usr/libexec/vncsession-start :6 (code=exited, status=0/SUCCESS)
 Main PID: 197770 (code=exited, status=0/SUCCESS)

Jun 14 15:28:12 gitlab.idm.nac-issa.org systemd[1]: Starting Remote desktop service (VNC)...
Jun 14 15:28:12 gitlab.idm.nac-issa.org systemd[1]: Started Remote desktop service (VNC).
Jun 14 15:28:14 gitlab.idm.nac-issa.org systemd[1]: vncserver@:6.service: Succeeded.
I did review the log (below) but I am not sure what the problem is. I couldn't find much info on this from the research i did. Many of my searches pointed to a DBUS issue that I didn't really understand.

cat gitlab.idm.nac-issa.org\:6.log

Code: Select all

Using desktop session gnome

New 'gitlab.idm.nac-issa.org:6 (jeremyt@ad.nac-issa.org)' desktop is gitlab.idm.nac-issa.org:6

Starting desktop session gnome


Xvnc TigerVNC 1.11.0 - built Dec 17 2020 04:16:33
Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12010000, The X.Org Foundation


Mon Jun 14 15:28:12 2021
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5906
 vncext:      created VNC server for screen 0
xinit: XFree86_VT property unexpectedly has 0 items instead of 1

** (process:197813): WARNING **: 15:28:13.091: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=GNOME environment variable: Could not connect: Connection refused
xinit: connection to X server lost

waiting for X server to shut down 
Mon Jun 14 15:28:13 2021
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)
Does anyone have tips on how to go about troubleshooting this? I did have VNC working before the upgrade but the older version of TigerVNC was using the wrapper script. I see the method to run VNC under TigerVNC has changed again... :-)

gerry666uk
Posts: 98
Joined: 2020/02/10 19:06:06

Re: VNC doesn't work after upgrade

Post by gerry666uk » 2021/06/17 18:22:47

I don't know if it will help, but I replied to another thread with links to the official guides

viewtopic.php?t=76387

it might be worth, checking the steps to ensure nothing has been missed.

When you say you can't connect, how exactly do you try to connect, e.g. do you run a command on a different machine, or something else?

JeremyTourville
Posts: 7
Joined: 2019/01/29 15:40:52

Re: VNC doesn't work after upgrade

Post by JeremyTourville » 2021/06/26 01:01:50

After doing some further testing I found out that I can get the vncserver service to run using a local account but not any accounts that are tied to my ipa server. For example:

Code: Select all

# TigerVNC User assignment
#
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
#
:2=jeremyt 
:3=jeremyt@ad.nac-issa.org
vncserver 2 will run with out issue.
vncserver 3 does not run.

The odd part is the fact that the ipa/domain account is an admin account and can sudo/become root on any system. Sudo works without any problems. I don't understand why a domain account won't start the service but a local account will. SELinux has been turned off and fapolicyd is not running.

#tail -f /var/log/messages

Code: Select all

Jun 25 20:12:51 vnc systemd[1333]: run-user-581401105.mount: Succeeded.
Jun 25 20:12:51 vnc systemd[1]: run-user-581401105.mount: Succeeded.
Jun 25 20:12:51 vnc systemd[1]: user-runtime-dir@581401105.service: Succeeded.
Jun 25 20:12:51 vnc systemd[1]: Stopped /run/user/581401105 mount wrapper.
Jun 25 20:13:15 vnc dbus-daemon[945]: [system] Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
Jun 25 20:18:58 vnc systemd[1]: session-8.scope: Succeeded.
Jun 25 20:18:58 vnc systemd-logind[1024]: Session 8 logged out. Waiting for processes to exit.
Jun 25 20:18:58 vnc systemd-logind[1024]: Removed session 8.
Jun 25 20:19:45 vnc systemd[1]: Started Session 15 of user root.
Jun 25 20:19:45 vnc systemd-logind[1024]: New session 15 of user root.
Jun 25 20:20:02 vnc systemd[1]: Starting Remote desktop service (VNC)...
Jun 25 20:20:02 vnc systemd[1]: Created slice User Slice of UID 581401105.
Jun 25 20:20:02 vnc systemd[1]: Started /run/user/581401105 mount wrapper.
Jun 25 20:20:02 vnc systemd[1]: Starting User Manager for UID 581401105...
Jun 25 20:20:02 vnc systemd[1]: Started Session 16 of user jeremyt@ad.nac-issa.org.
Jun 25 20:20:02 vnc systemd-logind[1024]: New session 16 of user jeremyt@ad.nac-issa.org.
Jun 25 20:20:02 vnc systemd[4183]: Started Mark boot as successful after the user session has run 2 minutes.
Jun 25 20:20:02 vnc systemd[4183]: Reached target Timers.
Jun 25 20:20:02 vnc systemd[4183]: Listening on Sound System.
Jun 25 20:20:02 vnc systemd[4183]: Listening on Multimedia System.
Jun 25 20:20:02 vnc systemd[4183]: Reached target Paths.
Jun 25 20:20:02 vnc systemd[4183]: Starting D-Bus User Message Bus Socket.
Jun 25 20:20:02 vnc systemd[4183]: Listening on D-Bus User Message Bus Socket.
Jun 25 20:20:02 vnc systemd[4183]: Reached target Sockets.
Jun 25 20:20:02 vnc systemd[4183]: Reached target Basic System.
Jun 25 20:20:02 vnc systemd[4183]: Starting Sound Service...
Jun 25 20:20:02 vnc systemd[1]: Started User Manager for UID 581401105.
Jun 25 20:20:02 vnc systemd[1]: Started Remote desktop service (VNC).
Jun 25 20:20:02 vnc systemd[4183]: Started D-Bus User Message Bus.
Jun 25 20:20:02 vnc gnome-session[4239]: gnome-session-binary[4239]: WARNING: Could not make bus activated clients aware of QT_IM_MODULE=ibus environment variable: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session[4239]: gnome-session-binary[4239]: WARNING: Could not make bus activated clients aware of XMODIFIERS=@im=ibus environment variable: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session-binary[4239]: WARNING: Could not make bus activated clients aware of QT_IM_MODULE=ibus environment variable: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session[4239]: gnome-session-binary[4239]: WARNING: Could not make bus activated clients aware of GNOME_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session[4239]: gnome-session-binary[4239]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session-binary[4239]: WARNING: Could not make bus activated clients aware of XMODIFIERS=@im=ibus environment variable: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session[4239]: gnome-session-binary[4239]: WARNING: Lost name on bus: org.gnome.SessionManager
Jun 25 20:20:02 vnc journal[4271]: Cannot open display:
Jun 25 20:20:02 vnc gnome-session-binary[4239]: WARNING: Could not make bus activated clients aware of GNOME_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session[4239]: Unable to init server: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session-binary[4239]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Jun 25 20:20:02 vnc gnome-session-binary[4239]: WARNING: Lost name on bus: org.gnome.SessionManager
Jun 25 20:20:03 vnc dbus-daemon[945]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.1099' (uid=581401105 pid=4208 comm="/usr/bin/pulseaudio --daemonize=no --log-target=jo" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jun 25 20:20:03 vnc systemd[4183]: Started Sound Service.
Jun 25 20:20:03 vnc systemd[4183]: Reached target Default.
Jun 25 20:20:03 vnc systemd[4183]: Startup finished in 882ms.
Jun 25 20:20:03 vnc systemd[1]: vncserver@:3.service: Succeeded.
Jun 25 20:20:03 vnc systemd[1]: session-16.scope: Succeeded.
Jun 25 20:20:03 vnc systemd-logind[1024]: Session 16 logged out. Waiting for processes to exit.
Jun 25 20:20:03 vnc systemd[4183]: pulseaudio.service: Succeeded.
Jun 25 20:20:03 vnc systemd-logind[1024]: Removed session 16.
Jun 25 20:20:03 vnc systemd[1]: Stopping User Manager for UID 581401105...
Jun 25 20:20:03 vnc systemd[4183]: Stopping D-Bus User Message Bus...
Jun 25 20:20:03 vnc systemd[4183]: Stopped target Default.
Jun 25 20:20:03 vnc systemd[4183]: dbus.service: Succeeded.
Jun 25 20:20:03 vnc systemd[4183]: Stopped D-Bus User Message Bus.
Jun 25 20:20:03 vnc systemd[4183]: Stopped target Basic System.
Jun 25 20:20:03 vnc systemd[4183]: Stopped target Timers.
Jun 25 20:20:03 vnc systemd[4183]: grub-boot-success.timer: Succeeded.
Jun 25 20:20:03 vnc systemd[4183]: Stopped Mark boot as successful after the user session has run 2 minutes.
Jun 25 20:20:03 vnc systemd[4183]: Stopped target Paths.
Jun 25 20:20:03 vnc systemd[4183]: Stopped target Sockets.
Jun 25 20:20:03 vnc systemd[4183]: pipewire.socket: Succeeded.
Jun 25 20:20:03 vnc systemd[4183]: Closed Multimedia System.
Jun 25 20:20:03 vnc systemd[4183]: pulseaudio.socket: Succeeded.
Jun 25 20:20:03 vnc systemd[4183]: Closed Sound System.
Jun 25 20:20:03 vnc systemd[4183]: dbus.socket: Succeeded.
Jun 25 20:20:03 vnc systemd[4183]: Closed D-Bus User Message Bus Socket.
Jun 25 20:20:03 vnc systemd[4183]: Reached target Shutdown.
Jun 25 20:20:03 vnc systemd[4183]: Starting Exit the Session...
Jun 25 20:20:03 vnc systemd[1]: user@581401105.service: Killing process 4304 (systemctl) with signal SIGKILL.
Jun 25 20:20:03 vnc systemd[1]: user@581401105.service: Succeeded.
Jun 25 20:20:03 vnc systemd[1]: Stopped User Manager for UID 581401105.
Jun 25 20:20:03 vnc systemd[1]: Stopping /run/user/581401105 mount wrapper...
Jun 25 20:20:03 vnc systemd[1]: Removed slice User Slice of UID 581401105.
Jun 25 20:20:03 vnc systemd[1305]: run-user-581401105.mount: Succeeded.
Jun 25 20:20:03 vnc systemd[2946]: run-user-581401105.mount: Succeeded.
Jun 25 20:20:03 vnc systemd[1333]: run-user-581401105.mount: Succeeded.
Jun 25 20:20:03 vnc systemd[1]: run-user-581401105.mount: Succeeded.
Jun 25 20:20:03 vnc systemd[1]: user-runtime-dir@581401105.service: Succeeded.
Jun 25 20:20:03 vnc systemd[1]: Stopped /run/user/581401105 mount wrapper.

gerry666uk
Posts: 98
Joined: 2020/02/10 19:06:06

Re: VNC doesn't work after upgrade

Post by gerry666uk » 2021/06/28 21:15:39

TigerVNC 1.11 is considered a major update, they say you should not try to use old config.

https://github.com/TigerVNC/tigervnc/bl ... r/HOWTO.md

I've also now upgraded from CentOS 8.3 to 8.4, and Xvnc and TigerVNC continue to work, but I'm using it in a different way with "socket activation" (similar to the official guides).

I don't know why all the D-Bus and session errors, but I believe they did some work on D-Bus as part of the move to 1.11

Post Reply