Setting up a VNC server for Ubuntu 22.04 with gnome can be frustrating, as there are limited resources online to properly set it up. Below is how I made it work eventually.

installation

1
2
3
4
5
6
7
8
# tigherVNC
sudo apt install tigervnc-standalone-server tigervnc-tools xfonts-100dpi xfonts-75dpi

# noVNC
wget https://github.com/novnc/noVNC/archive/refs/tags/v1.5.0.zip
uzip noVNC-1.5.0.zip
cd noVNC-1.5.0/utils
bash novnc_proxy

launch VNC service

1
2
3
4
5
6
tigervncserver -xstartup /usr/bin/gnome-session
./noVNC-1.5.0/utils/novnc_proxy --vnc localhost:5901

# some useful commands for vnc:
vncserver -list
vncserver -kill :1

Reboot once if black screen shown.

connect from client machine

In web browser, visit your noVNC address, e.g.:http://192.168.199.168:6080/vnc.html?host=kitty-ThinkPad-Edge-E320&port=6080``

You might need to set the Host to your server IP address manully, then click connect. Here you go!