Quick setup of VNC server on headless machines (debian)

Quick VNC setup script for Debian

Here is a simple script that will install and setup VNC on a debian machine e.g. Armbian SBC, Nas, Laptop or Desktop etc..
It only requires you to enter your sudo password to install the required packages, and create passwords for a new “vnc” user and a vnc connection password for access from your vnc client machine.

Extract the script and make executable with “chmod +x”. Then run it, entering the passwords for the VNC user and VNC connection when asked.

You can start, stop or reload the tightvncserver by executing one of the following lines

I use  Vinagre, a remote desktop viewer for the GNOME desktop to connect to the VNC host machine from my Ubuntu Laptops.

Below are some results of running the script on various machines