Virtual Network Computing or simply popular name VNC is a protocol mostly used by Linux servers to create remote desktop connection. VNC is also used for different operating systems like MacOS, Windows, Unix, BSD etc. There are different VNC client and server sides applications like TightVNC, TigerVNC, RealVNC etc. We will prefer VNC application provided by Ubuntu distribution which is TightVNC.
VNC Server 4.1 retains full compatibility with VNC Server 4.0, with respect both to command-line parameters and to registry configuration options. When installed on a system that has already been fully configured for VNC Server 4.0, VNC Server 4.1 will use the existing settings, without the need for reconfiguration. VNC server ports starts from tcp 5900 by default and session number is added to find related port number. For example session 1 is tcp port 5900+1=5901. Connect To VNC Server. To connect VNC server we need some VNC client in the client computer. There is no problem if the client and server applications are different. The output will be like this, so notice the pid 1328. In order to stop the vnc server, we have to 'kill' this process. email protected:$ kill -9 1328. The option -9 for the kill command will send the KILL signal to the process id to make sure that it stops. Script to run the VNC server.
Desktop Environment
Desktop Environment is group of applications used to provide GUI desktop experience to the user. There are different Desktop Environments like GNOME, KDE, Xfce, LXDE etc. In this tutorial we assume you have all ready install one of those desktop environment. VNC server will provide installed Desktop Environments. If there is no desktop environment or it is not configured correctly generally a black screen will appear.
As we stated before we will install VNC server into Ubuntu. We assume that we have an existing Desktop as stated previously. We will install tightvncserver package from Ubuntu yaketty but alternative VNC servers or alternative distributions can be installed with similar steps like below. As we will install app we need root privileges which can be provided with sudo
or with root user.
The most error prone and important part of the setup of VNC Server is configuration part. We will run vncserver
command and follow the steps.
We will provide a password for the current user vncserver session. There is also an verification step to be sure password in entered correctly.
We have configured VNC Server and created session number 1 which is stated as ubu2:1
with the host name. Here ubu2 is the host name and 1 is the session number which also specifies a port.
Best Vnc Server Free
VNC server ports starts from tcp 5900 by default and session number is added to find related port number. For example session 1 is tcp port 5900+1=5901 .
Vnc Server Download
To connect VNC server we need some VNC client in the client computer. There is no problem if the client and server applications are different. In this situation we use Tightvnc client too. First open client.
And put the host and session information like above ubu2:1
. There is also alternative expression format by provided port number directly like ubu2:5901 .
And click connect. There is also Options
part which is used to configure connection parameters like window size, compression algorithm, compression ratio, cursor behavior etc.
We should enter password in to the provided box like below.
And we will get our desktop if there is no problem
By default VNC is not an encrypted protocol. This can create security problems. One of the steps to take in order to make more secure is tunneling via encrypted channels like ssh tunnels. Ssh encrypted and secure protocol. Ssh provides tunneling which can be used for all network streams and connections. Following command will create a secure channel between client and server.
-L 5901:127.0.0.1:5901
will bind our localhost port number5901
to the remote ssh server local port5901
-N
used to do not execute remote command-f
used to send ssh to the background[email protected]
used to provide userismail
and serverubu2
Windows Vnc Server
Killing will just stop provided session and do not kill whole VNC server or other sessions do not provided. There is a practical command which will use session number like below.