Get Rewarded! We will reward you with up to €50 credit on your account for every tutorial that you write and we publish!

How To install TigerVNC on Ubuntu

profile picture
Author
Friedrich Lucas
Published
2020-11-27
Time to read
3 minutes reading time

About the author- non vitae sed scholae discimus

Introduction

TigerVNC is an open-source VNC (Virtual Network Computing) software, that allows users to use graphical applications on servers.

Prerequisites

  • A server running Ubuntu 18.04 (tested)

Step 1 - Installing packages

The easiest way of installing TigerVNC on a new system is by using the apt repository.

$ sudo apt update
$ sudo apt upgrade
# Install virtual window manager, terminal emulator, xfce and tigervnc
$ sudo apt install fvwm xterm xfce4 xfce4-goodies gnome-session tigervnc-standalone-server tigervnc-common

Step 2 - Configure and start the VNC server

Step 2.1 - Start and kill the VNC server

To start the server you can run the following command:

$ vncserver

On the first start you must enter a VNC password.

To kill VNC instances run the following commands:

# Kill all running VNC instances
$ vncserver -kill :*

# Kill only one instance by id
$ vncserver -kill :<id>

To list all running instances you can run the following command:

$ vncserver -list

Step 2.2 - Configure the VNC server

You can create a configuration file at ~/.vnc/xstartup.

# Create the startup file
$ touch ~/.vnc/xstartup

# Set the file permission
$ chmod 700 ~/.vnc/xstartup

# Edit the file
$ vi ~/.vnc/xstartup

An example configuration for xfce4:

#!/bin/sh
xrdb $HOME/.Xresources
startxfce4 &

Step 2.3 - Complete configuration

Finish the configuration by starting the server:

$ vncserver

Step 3 - Connect to VNC

To connect from your local computer to the VNC server first open an SSH tunnel to the server:

$ ssh holu@10.0.0.1 -L 5901:127.0.0.1:5901 -N

After this you can use a VNC client to connect to the server with the address 127.0.0.1.

Conclusion

You are now ready to access your server via VNC (for example by using the vncviewer client provided by TigerVNC).

License: MIT
Want to contribute?

Get Rewarded: Get up to €50 in credit! Be a part of the community and contribute. Do it for the money. Do it for the bragging rights. And do it to teach others!

Report Issue

Discover our

Dedicated Servers

Configure your dream server. Top performance with an excellent connection at an unbeatable price!

Want to contribute?

Get Rewarded: Get up to €50 credit on your account for every tutorial you write and we publish!

Find out more