I just upgraded Ubuntu 20.04 LTS to Ubuntu 22.04 LTS.
Before the release upgrade, I was able to access the desktop on 20.04 from Windows 10/11 using RealVNC, but now after the upgrade to Ubuntu 22.04, I can no longer connect using RealVNC.
I set up the VNC server on Ubuntu 22.04 in the same manner I used to set it up on 20.04, but every time I try to connect, I get the message on the VNC Viewer The connection was refused by the computer
.
I have checked and re-checked all of the parameters on both sides, but nothing works.
The only thing I can think of is that my port is incorrect. I had changed the port used by VNC Server on Ubuntu for security purposes, and I also enabled connection on that port using the ufw command on Ubuntu:
sudo ufw allow from any to any port 5900 proto tcp
I have also tried using the Remote Desktop connection in Windows 11, following instructions on setting up the Ubuntu box from a website I found through a Google search, but still no luck.
I have a gut feeling that there is only one thing I have forgotten to set up.
I recall having this problem when I upgraded Ubuntu 20.04 LTS to 21.04, and ended up going back to 20.04 LTS.