I’ve found out that KDE/Plasma is not yet compatible with Wayland, and some programs will not work:
$ krfb --help
QSocketNotifier: Can only be used with threads started with QThread
$ x11vnc -usepw -forever -display :0
Enter VNC password:
Verify password:
Write password to /home/kde/.vnc/passwd? [y]/n
Password written to: /home/kde/.vnc/passwd
21/11/2024 10:40:28 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 18145
21/11/2024 10:40:28 Wayland display server detected.
21/11/2024 10:40:28 Wayland sessions are as of now only supported via -rawfb and the bundled deskshot utility. Exiting.
The way to fix it is to use another desktop:
- Plasma (Wayland): no remote desktop apps are working at least the ones I tried
- Plasma (X11): freezes when trying to enter to desktop in normal session
- Xubuntu Session: works fine
I selected Xubuntu Session and made it default in sddm.
After being logged in locally, go to Applications > Settings Manager > Session and Startup > Application Autostart > + Add > in command put “x11vnc --usepw -forever -display :0” > OK.
The command also works running it from the terminal.
Then after each login remote desktop over VNC is already running.
In Kubuntu 22.04 Krfb was running perfectly fine but in 22.10 Ubuntu switched to Wayland. The problem is that some software is not yet compatible, and probably won’t be until 23.04 or even later.
So my advice is STAY ON UBUNTU 22.04 LTS until 26.04 LTS comes out to avoid weird issues. On Arch linux this does not happen.