Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following steps are tested on Ubuntu Server 20.04

Configure the server

Install a basic GUI, a VNC server and some necessary utilities

...

Code Block
$ cat << EOF >> ~/.bashrc
if [ -z "${DISPLAY}" ] && [[ "${XDG_VTNR}" -eq 1 ]]; then
  exec startx
fi
EOF


Congratulations. You are now done, and you should do a reboot.

Connect to the VNC server

When the steps above are completed, you are reday to connect. The configured VNC server is only listening to localhost. So, to be able to connect you need to setup a SSH tunnel on your client. This should work in Linux, MacOS and in PowerShell on windows:

Code Block
$ ssh -f -L <some random high port>:127.0.0.1:5900 ubuntu@<ip to server> -N

Example:
$ ssh -f -L 15900:127.0.0.1:5900 ubuntu@10.212.136.100 -N

Now you can connect to localhost:15900 with your favourite VNC client.