Virtual Network Computing or VNC is a cross-platform sharing technology that allows users to access their computers remotely. Using VNC, users can even control their mouse, keyboard, and other peripheral devices remotely, thus creating a virtual environment such that they are sitting right in front of their system. The VNC technology is quite gripping and inspiring. It enables the wide range of a computer’s abilities to be used in new and innovative ways. VNC works on the server-client model. The VNC server is installed on the computer, which will be controlled, and the VNC viewer or client is installed on the controlling device. The controlling device can be either a computer or any smart mobile phone and tablet. Once setup is done, the server sends a copy of the desktop environment to the client device. VNC is available for multiple platforms, including Linux and its various distros. Installing and configuring VNC on your system can be a bit tricky, so if you want to know how to install VNC on Ubuntu without any hindrances, you’ve come to the right place. So let’s get started!
Step 1: Install a Desktop Environment.
The first thing that you need to do is to install a desktop environment. Desktop environments are applications that give you an alternative to the default desktops provided by your operating systems. Considering that VNC operates on the server-client model, the quality of your experience using VNC depends on -among other things- the rate of data transfer. So, using lightweight desktop environments is the better option. There are multiple environments available for Ubuntu. It’s on you which environment you want to install and use. We will be installing the Xfce desktop environment application for our Ubuntu. You can follow these steps to install an environment of your choice. Press ‘Y’ to grant permission and start the installation process. These are the steps you can follow to install different desktop environments. In case there is no repository package for your preferred environment, use your web browser to install the package and run the setup.
Step 2: Install and Configure TightVNC Server.
The next step of how to install VNC on Ubuntu is to install the VNC server and configure it on your main computer. Follow these steps to install it and properly configure it. You’d have to enter a password first. After verifying the password, you will have the option to create a view-only password. The view-only password will allow users to see just the desktop, but they can’t use the keyboard or mouse. You need to configure the VNC server to operate using your preferred desktop environment. The commands that VNC runs at startup are located in the “xstartup.vnc” folder. You will be making changes to this file to create a backup for it using the following command. Secure your changes by saving and closing the file. Restart the server using the $vncserver -localhost command. “-localhost” will instruct VNC to use the server on which it is installed to make connections.
Step 3: Establish an SSH Tunnel.
VNC isn’t very safe on its own. The security protocols used by VNC are weak and can be hacked into by perpetrators. You should establish an SSH tunnel between your computer and the server to prevent such things from happening. The SSH tunnel will add a layer of security to your connection, and only those users will have access to VNC who have SSH access to your server. You need to instruct the VNC to make a connection using SSH rather than making a direct one. This can be done by following these steps: When you execute this command, the VNC server is instructed to connect port 5901 and port 59000 on your computer using port 22, which is the default port for SSH.
Step 4: Execute VNC as a System Service.
By configuring VNC to execute as a system service, you can start, run and close it like any other system application. It is a better option rather than having VNC always boot up when your system starts. To run VNC as a system service, follow these steps: After adding these lines, secure the changes by saving and closing the file. With this, you are done with installing VNC on Ubuntu. Another service that makes use of remote management is Webmin. Webmin is a must-have as it allows the user to remotely access and manage their web server from the comfort of their web browser. This article was a step-by-step tutorial on how to install VNC on your Ubuntu system. We hope that we were able to cover up everything, and we helped you out in setting up VNC on your computer. If you have any questions or suggestions, let us know in the comment section down below.