Vnc server no longer works after f39 -> f40

I’ve been running a Fedora 39 Workstation with KDE in a VM on Proxmox. I also setup a vncserver.
I can either start a KDE session via Proxmox (double-click on the VM name) or via a VNC viewer.

After upgrading to f40 (via dnf and w/o errors), I can still start the KDE session via Proxmox.

But vnc no longer works. The vnc service is not running and the error messages are rather useless:

journalctl -xeu vncserver@:1.service
Apr 24 19:08:09 jopin-dev-kde2 systemd[1]: Starting vncserver@:1.service - Remote desktop service (VNC)...
░░ Subject: A start job for unit vncserver@:1.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit vncserver@:1.service has begun execution.
░░
░░ The job identifier is 4376.
Apr 24 19:08:09 jopin-dev-kde2 systemd[1]: Started vncserver@:1.service - Remote desktop service (VNC).
░░ Subject: A start job for unit vncserver@:1.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit vncserver@:1.service has finished successfully.
░░
░░ The job identifier is 4376.
Apr 24 19:08:09 jopin-dev-kde2 systemd[1]: vncserver@:1.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit vncserver@:1.service has successfully entered the 'dead' state.
jopin-dev-kde2:1.log
Could not find a desktop session to run

When I start the vnc server as the user (instead of systemctl start vncserver@\:1.service as root), I get:

$ vncserver :1

WARNING: vncserver has been replaced by a systemd unit and is now considered deprecated and removed in upstream.
Please read /usr/share/doc/tigervnc/HOWTO.md for more information.

New 'jopin-dev-kde2:1 (tessus)' desktop is jopin-dev-kde2:1

Starting applications specified in /home/tessus/.vnc/xstartup
Log file is /home/tessus/.vnc/jopin-dev-kde2:1.log

and a vnc process is running. However, when trying to connect, this is all I get:

1 Like

Anyone? I know this might not be high priority, but on the other side it’s rather disconcerning that an otherwise perfect OS upgrade renders the vnc server useless and broken.

P.S.: Additionally all topics I have found by searching the net that have anything to do with this topic (even remotely) are utterly unhelpful and worthless.

I don’t know how you configure VNC. There is a lot of conflicting documentation.

This is what I do:

  1. Install (on Fedora ) dnf install *tigervnc*
  2. Set my vncpasswd
  3. Paste a 4 line config into /etc/tigervnc/vncserver-config-mandatory
session=xfce
securitytypes=vncauth,tlsvnc
geometry=1450x900
alwaysshared
  1. Assign a port number to a user who has a password (step 2) in /etc/tigervnc/vncserver.users
:1=user1
:2=user2
:3=user3
  1. Start the service: systemctl enable --now vncserver@:x
  2. Make sure the port is open on the firewall or tunnel in via SSH port 22

Yep, this is certainly true, but my setup worked just fine in f39.

Thanks a bunch for the reply. I’ve also been doing all of that except the Paste a 4 line config into /etc/tigervnc/vncserver-config-mandatory step, since I’m using KDE.

And with f39, the KDE session works perfectly fine via vnc.

My /etc/tigervnc/vncserver-config-mandatory and my ~/.vnc/config are empty. My ~/.vnc/xstartup is the one that Fedora created:

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/etc/X11/xinit/xinitrc
# Assume either Gnome will be started by default when installed
# We want to kill the session automatically in this case when user logs out. In case you modify
# /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should
# be responsible to modify below code to avoid that your session will be automatically killed
if [ -e /usr/bin/gnome-session ]; then
    vncserver -kill $DISPLAY
fi

The issue is that everything worked fine with f39. But after the upgrade to f40, it doesn’t work anymore. Why? It makes no sense. How can the upgrade break a perfectly fine setup?

There was no info regarding a breaking change for VNC.

My setup is correct. But vnc doesn’t work. Why? The error message is useless. I hoped that a dev could shed some light on this, since this entire situation makes no sense.

I’m also willing to give people access to the f39 and f40 VMs via ssh. Although I would have to isolate and strip down the VMs.

But my point is, I can’t believe I am the only person in the world who had a perfectly fine vnc setup for KDE in f39 that stopped working after the upgrade to f40.

Sorry, I overlooked the KDE bit. KDE doesn’t work. I think but am not sure it’s the Wayland bit.
Gnome works and so does LXQTbut not LXDE.

Do you have the plasma X11 session installed?
plasma-workspace-x11

3 Likes

Can you try $ vncserver :1 see what happens?

Hmm, this is too bad. As you can see from the hostname it is a KDE dev machine, thus I need to see how something looks in KDE. :wink:
Besides from that I like KDE the most, thus in the rare occasions I use a UI or DE, I want it to be KDE.

Nope, it is not installed. I’ll try this right after I post this reply.

I did. Please see my original post (around the middle where it says: When I start the vnc server as the user…).

Wow, this did the trick. Thany you so much. How did you find this out?

On another note: Shouldn’t the f39 → f40 upgrade process install this package?

What did you set the session to?

I’m not entirely sure what session you are referring to. Can you be a bit more specific?

I didn’t set anything except what I have mentioned in my comments.

in /etc/tigervnc/vncserver.users:

:1=tessus

And after installing plasma-workspace-x11, starting vnc with systemctl start vncserver@\:1.serviceworks as it did in f39.

I was referring to this:

Well, as I put in my previous comment, these files are empty and I have also posted my xstartup file. As you can see, I didn’t set the session anywhere.

But by looking at some of the files that seem to be involved, the system determines the current DE (or a preferred DE when an env var is set) and starts the session. I suspect since I don’t have any env var set and I am only having KDE installed, the system determined that KDE is wanted and starts it for vnc.

The plasma x-session was removed by, Changes/KDE Plasma 6 - Fedora Project Wiki

There a discussion thread about it, F40 Change Proposal: KDE Plasma 6 (System Wide)

2 Likes

Hmm, I still do not fully understand. So the idea that someone would want to use vnc and KDE came never up during those discussions, nor was plasma wayland never tested with vnc? This seems a bit strange to me.
Am I really the only one in the world who runs vnc with KDE?

Additionally, it seems that people want to get rid of x11 in favor of wayland, yet wayland apparently does not work with vnc and still has other compat issues. Are these issues going to be resolved before x11 is kicked to the curb for good? Or will in fXX vnc just stop working with KDE?

P.S.: Please note that I do not imply or mean that any of this is your fault.

There is always Xfce. Works great for vnc. Not looking for a heavily customised desktop. Just want to go in and go out quickly and anyway most of the time is spent in one GUI app or another which is independent of the DE.

In theory I agree with you. However, this is a KDE dev VM to test the KDE appearence of an app. Anything but KDE thus makes no sense in this specific case.

Well, there are other tools than VNC, for example there’s

and

Note that libvirt by itself can provide remote access to guests with VNC and SPICE, so you don’t even need to set up TigerVNC.

1 Like

Tell me more :exclamation: :sunglasses: