TigerVNC no longer working on 24.04.1 LTS
Bo Berglund
bo.berglund at gmail.com
Fri Jan 3 10:49:56 UTC 2025
I have dist-upgraded from 22.04 to 24.04.1 on an HP laptop which normally sits
in a cupboard running server chores with the lid closed.
I need it for GUI work now and then using VNC to access the MATE desktop.
I did not manage to connect when I last wanted to a month ago but had no time to
investigate then....
Now after I yesterday made a dist-upgrade to 24.04.1 LTS I am checking the
general functionality and got to the non-working VNC...
I still cannot connect from my PC using the RealVNC Viewer that used to work
fine... :(
I checked the state:
---------------------------------------------------------------------------
$ sudo systemctl status vncserver at 1
× vncserver at 1.service - Systemd TigerVNC server startup script for Ubuntu 20.04
Loaded: loaded (/etc/systemd/system/vncserver at .service; enabled; preset:
enabled)
Active: failed (Result: exit-code) since Thu 2025-01-02 17:09:33 CET; 18h
ago
CPU: 885ms
jan 02 17:09:33 auriga-ubuntu vncserver[1717]:
=================================================================================
jan 02 17:09:33 auriga-ubuntu vncserver[1717]: Session startup via
'/home/bosse/.vnc/xstartup' cleanly exited too early (< 3 seconds)!
jan 02 17:09:33 auriga-ubuntu vncserver[1717]: Maybe try something simple first,
e.g.,
jan 02 17:09:33 auriga-ubuntu vncserver[1717]: tigervncserver -xstartup
/usr/bin/xterm
jan 02 17:09:33 auriga-ubuntu dbus-daemon[1771]: [session uid=1000 pid=1764]
AppArmor D-Bus mediation is enabled
jan 02 17:09:33 auriga-ubuntu vncserver[1717]: The X session cleanly exited!
jan 02 17:09:33 auriga-ubuntu vncserver[1717]: Killing Xtigervnc process ID
1718... success!
jan 02 17:09:33 auriga-ubuntu systemd[1]: vncserver at 1.service: Control process
exited, code=exited, status=255/EXCEPTION
jan 02 17:09:33 auriga-ubuntu systemd[1]: vncserver at 1.service: Failed with
result 'exit-code'.
jan 02 17:09:33 auriga-ubuntu systemd[1]: Failed to start vncserver at 1.service -
Systemd TigerVNC server startup script for Ubuntu 20.04.
------------------------------------------------------------------------------
In my ~/.vnc dir I have a few log files and the end of the last one it contains
the most recent entry and looks like this is from my last attempt at starting
the server (I assume):
----------------------------------------------------------------------------
Xvnc TigerVNC 1.12.0 - built 2024-01-23 19:20
Copyright (C) 1999-2021 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12101004, X.Org
Thu Jan 2 10:46:16 2025
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
3NI3X0 New Xtigervnc server 'auriga-ubuntu:1 (bosse)' on port 5901 for display
:1.
3NI3X0 Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd
/home/bosse/.vnc/passwd auriga-ubuntu:1 to connect to the VNC server.
[mi] mieq: warning: overriding existing handler (nil) with 0x55aff9a81b90 for
event 2
[mi] mieq: warning: overriding existing handler (nil) with 0x55aff9a81b90 for
event 3
Thu Jan 2 10:46:17 2025
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
/usr/bin/x-terminal-emulator: Requested to be used as a login shell, but it's
not supported
vncconfig: unable to open display ":1"
libmutter-Message: 10:46:17.233: Running Mutter (using mutter 42.9) as a X11
window and compositing manager
** (mate-session:1451): WARNING **: 10:46:17.263: Cannot open display:
Failed to setup: Unable to open display ':1'
----------------------------------------------------------------------------
The xstartup file in the same dir looks like this:
~.vnc/xstartup (created 2021-11-20 when I set it all up):
---------------------------------------------------------
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset DBUS_SESSION_BUS_ADDRESS
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
mate-session &
#exec /usr/bin/mate-session &
----------------------------------------------------------
The service file
/etc/systemd/system/vncserver at .service
contains this:
----------------------------------------------------------
[Unit]
Description=Systemd TigerVNC server startup script for Ubuntu 20.04
After=syslog.target network.target
[Service]
Type=forking
User=bosse
ExecStartPre=-/usr/bin/vncserver -kill :%i &> /dev/null
ExecStart=/usr/bin/vncserver -depth 24 -localhost no -geometry 1680x1040 :%i
PIDFile=/home/bosse/.vnc/%H:%i.pid
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
----------------------------------------------------------
I also looked at what is installed and found:
----------------------------------------------------------
$ apt policy tigervnc-standalone-server
tigervnc-standalone-server:
Installed: 1.13.1+dfsg-2build2
Candidate: 1.13.1+dfsg-2build2
----------------------------------------------------------
So it looks like I have the very latest version...
What if anything am I missing here?
Has there been changes to the various config files in use?
Grateful for any advice on fixing this!
TIA
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list