Follow:
https://serverspace.io/support/help/install-tightvnc-server-on-ubuntu-20-04/
https://linuxconfig.org/vnc-server-on-ubuntu-20-04-focal-fossa-linux
$ nano ~/.vnc/xstartup
Insert the following few lines and then save your changes and exit the file:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &
By default, TightVNC does not have a daemon and does not turn on after a system reboot. To fix this, let’s create a new unit in systemd.
nano /etc/systemd/system/vncserver.service
Insert the following config there:
[Unit]
Description=TightVNC server
After=syslog.target network.target
[Service]
Type=forking
User=pi
PAMName=login
PIDFile=/root/.vnc/%H:1.pid
ExecStartPre=-/usr/bin/vncserver -kill :1 > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1920x1080
ExecStop=/usr/bin/vncserver -kill :1
[Install]
WantedBy=multi-user.target
Be sure to setup a User=<your_user> in this file