How to Install VNC Server on Ubuntu 14.04 LTS

VNC is short for ‘Virtual Network Computing’. It’s a simple method for sharing a graphical desktop environment. For example, if you install VNC on your hosted server, you could connect to its graphical desktop environment remotely.

Step #1: Install the TightVNC VNC Server


As a matter of best practices, let’s reload the package database:

sudo apt-get update


At this point, installing the TightVNC VNC Server is as simple as running just one command:

sudo apt-get install -y tightvncserver


Step #2: Add a Password for the VNC Server


Use the following command to set a secure password:

vncserver


After the access password is set, you’ll be asked whether or not you want to set the view-only password. This feature is helpful for demonstrations via VNC. In that scenario, people logged in with the view-only password would not be able to control the VNC session with their mouse or keyboard, but would be able to view the session.


Running VNC server will also create a default startup script, start the applications specified in the default config file, and create a log file.


Step #3: Additional Information and Options

Note: Even with a password VNC is still inherently insecure. It is best to force all VNC traffic through a VPN or an SSH tunnel. A tutorial on configuring TightVNC for use with an SSH tunnel is forthcoming.


By default, TightVNC launches a default session listening on port 5901.


Running the command:

netstat -plant


Shows:

Proto  Recv-Q  Send-Q  Local Address  Foreign Address  State  PID/Program name
tcp    0       0       0.0.0.0:5901   0.0.0.0:*        LISTEN 27760/Xtightvnc


Port 5901 is called a display port; the VNC session listening on port 5901 is referred to with a display number, which in this case is :1. The general naming convention is: display number :x refers to display port 5900 + x.


To stop a session running on a specified display number (:1 in this case) use the following command:

vncserver -kill :1

  • 76 Users Found This Useful
Was this answer helpful?

Related Articles

How to List Compiled PHP Modules from Command Line

Pre-Flight Check These instructions are intended specifically for listing compiled PHP modules...

How to Install or Uninstall PECL Extensions

Pre-Flight Check These instructions are intended specifically for installing or uninstalling...

How to Install the MongoDB PHP Driver (Extension) on CentOS 6

Step 1: Setup Environment, Install PHP Extension & Application Repository (PEAR) As a matter...

How to Add a User and Grant Root Privileges on CentOS 6.5

Step 1: Add the User It’s just one simple command to add a user. In this case, we’re...

How to Add a User and Grant Root Privileges on Ubuntu 14.04

Step 1: Add the User It’s just one simple command to add a user. In this case, we’re...

Powered by WHMCompleteSolution