1.Commands: to setup different desktop. Note that the desktops used by VNC server shall not be the same as that for direct access' desktop. e.g. I use KDE for local desktop, then my remote desktop is gnome.
-- for gnome desktop
xsetroot -solid grey
vncconfig -iconic &
dbus-launch --exit-with-session gnome-session &
-- for xfce4
startxfce4 &
-- for kde
startkde &
2. commands to start/stop vncserver. Note that avoid to use sudo, otherwise the vncserver will be started as root instead of logon user. In the end, it causes file permission issue of .Xauthority
start : vncserver
stop : vncserver -kill :1
Ref: https://www.teknotut.com/en/install-vnc-server-with-gnome-display-on-ubuntu-18-04/