In this tutorial, we will show you how to install VNC on Debian 10. For those of you who didn’t know, VNC (Virtual Network Computing) server is free and open-source software that is designed for allowing remote access to the Desktop Environment of the server to the VNC Client whereas the VNC viewer is used on the remote computer to connect to the server.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of the VNC server on an Ubuntu Debian 10 (Buster).
- A server running one of the following operating systems: Debian 10 (Buster).
- It’s recommended that you use a fresh OS install to prevent any potential issues.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install VNC on Debian 10 Buster
Step 1. Before we install any software, it’s important to make sure your system is up to date by running the following
apt-get commands in the terminal:
sudo apt update sudo apt upgrade
Step 2. Installing VNC Server on Debian 10.
Now we use the TigerVNC server. This package provides a standalone VNC server that is used to connect to the clients. Use the install command to download the package:
sudo apt install tigervnc-standalone-server tigervnc-common
Once successfully installed the next step is to run the
vncserver the command which will create the initial configuration and set up the password:
Step 3. Configure VNC Server.
You should first stop the VNC server which is running on port 5091 with the following command:
vncserver -kill :1
The next step is to create the
systemd unit file named
sudo nano /etc/systemd/system/vncserver@.service
Paste the following content:
[Unit] Description=Start TightVNC server at startup After=syslog.target network.target [Service] Type=forking User=root Group=root WorkingDirectory=/home/root PIDFile=/root/.vnc/%H:%i.pid ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i ExecStop=/usr/bin/vncserver -kill :%i [Install] WantedBy=multi-user.target
Then, enable the unit file with the following command:
sudo systemctl daemon-reload sudo systemctl enable firstname.lastname@example.org sudo systemctl start email@example.com
Step 4. Connecting to VNC server.
To access the remote desktop on the VNC server from the windows system, you must have a VNC viewer installed on your system. There is various VNC viewer available to use. Download any one and install on your system, for example:
If you are using putty, then you need to set the ssh tunneling. Let’s have a look at the command below to enable ssh tunneling in Linux:
ssh -L 5901:127.0.0.1:5901 -C -N -l username your_server_ip
Congratulations! You have successfully installed VNC. Thanks for using this tutorial for installing VNC on Debian 10 Buster system. For additional help or useful information, we recommend you check the official VNC website.