Ubuntu, TigerVNC

Setup VNC via ssh on Ubuntu Desktop.

Install TigerVNC.

# Ubuntu 18.04
sudo apt install tigervnc-scraping-server
# Ubuntu 16.04
sudo apt install tigervncserver

Set password.

vncpasswd

startVNC.sh

#!/bin/bash
x0tigervncserver PasswordFile=~/.vnc/passwd Display=:0

configure LocalForward LOCALPORT localhost:5900 in ~/.ssh/config.