How To Connect To Linux With VNC?

524 Views
0 rating based on 0 reviews

VNC stands for virtual network computing and it is used to remotely control a computer. This guide will teach you how to connect to a Linux computer with VNC so that you can view the screen and use the computer as if you were sitting right in front of it. By the end of this guide, you will know how to connect your Android phone or tablet, iPhone or iPad, Mac or Windows PC/laptop to a Linux server through VNC.

Connect to Linux with VNC

Virtual Network Computing (VNC) is a particular program that can perform the complicated task of connecting to a Linux system. However, for doing this, you have to build a VNC server on a Linux system. Here, we will do it on a CentOS system. So, follow this article to have a proper idea about how to connect to Linux with VNC.

Connecting to Linux with VNC

  1. First, you have to set up the Tiger VNC application on the CentOS system. Put this command for installing:
    Tiger VNC application
  2. After completing the installation, you have to make a service file in “/etc/system d/system/”. As it doesn’t have an idea of how the user wishes to use it. Here, we will adjust it for an individual user – root. The installation process has made a file named this:
    make a service file
  3. Copy the file. Place it in the “/etc/system d/system/” folder. Put an attachment such as this:
    Put an attachment
  4. You have altered the title from “VNC server @ service” to this title “VNCserver@:1.service”. Whenever you wish to permit sign in from another individual, you can make another file with “2” and onward.
  5. Now, the next step is to alter the service file using the user name. You had transferred some unfinished files into the “/etc/systemd/system/” folder. So, you have to complete it. You must change the “” section with the title of the individual you wish to permit access using the Tiger VNC. It will have to be altered twice. First, access the service file for rewriting:
    Access the service file
  6. After that, apply the “Search” option. Change the “” with the individual user name. At these two places:
    Change the User
  7. Also, see if the directory for “PID File” prevails. An error will come out if it is not there. You may alter the path for solving this error. For the primary file, the path was something like this:
    Primary Path
  8. The error will be gone after you change the path to this:
    Modified path
  9. Now, you have to authorize the VNC service. Then, launch it. After the alteration and saving of that alteration are complete, authorize the VNC service applying this command:
    authorize the VNC service
  10. You have to rerun this command for every service file that you made and modified. At the “/etc/system d/system/”, it will situate links to the proper “wants” catalog. Then, refresh the service adjustments with this command:
    Run this command to refresh
  11. Launch the VNC services with this:
    VNC services with this
  12. Now, put a password to the VNC server. And, also set the port numbers. Sign in with the user that wants to join. Then, apply this command:
    password to the VNC server
  13. This command will ask you to put a password for joining the VNC server. It is different from your sign in password. It also shows you the port number “1”:
    Port number
  14. So, add the number to the given port. And it will be 5901 for this individual user. You may check it by going through the log file. Now, you can connect with the Linux system using this password and port number.
  15. Download the VNC Viewer. Install it. Launch the application. Put the IP address and port number on the top given box.
    The IP address and port number
  16. Then, it will ask for the password you have set before. Then, it will permit you to connect.
    Password you have set before

So, that’s how you can connect to Linux with VNC.

Summary: Connect to Linux with VNC

  • Connect to Linux with VNC.
  • Establish a connection.
  • Install VNC Viewer on the client device.
  • Verify that Virtual Network Computing (VNC) is enabled on the server device.
  • Get the IP address or hostname of the server device.
  • Connect to the server device.