How to Enable Remote Desktop Ubuntu using VNC (Step by Step Tutorial). In this guide, we will introduce VNC, its uses, advantages then move onto the VNC server and installation phase. After following this guide, you can easily set VNS server on your Ubuntu machine and manage it remotely over the internet.
Shall we start with How to Enable Remote Desktop Ubuntu using VNC (Step by Step Tutorial).
VNC, or Virtual Networking Server, is a remote desktop sharing system that lets you control another computer in another location. These tools are lightweight and versatile, making them one of the best remote desktop software. VNC server makes managing files, software, and settings on a remote server easier for users who are not yet comfortable with the command line.
Apart from controlling another computer in different places, it also helps to:
Today, Virtual Networking System is used in two ways: to access remotely from the comfort of your home or through remote technical support that takes over the computer for support activities.
Remote Workers
Several companies enable workers to work remotely using the VNC server desktops. Offers some security so that employees do not have to take the documents and emails of the company with them. All they can do is log into their working computer and start working on the data given in it.
Business Continuity Processes (BCP)
Companies encounter multiple disasters, making physical access to the workspace impractical. However, with the help of VNC, the necessity for physical access is removed from the computer, and workers can continue working without any interruptions.
Remote Technical Support
VNC is considered the perfect solution for remote technical support. It is because it enables a remote technician to control your desktop. The best part about this is that the person requiring support does not have to be knowledgeable.
Developed in the ’90s, the VNC server is a mature product that operates on a very robust but simple protocol known as Remote Framebuffer Protocol. It is essentially platform independent as the mechanism used to transport desktop images, and keyboard presses back and forth exist under the operating system. Although a separate operating system client and server is required, there are VNC clients and server clients for every operating system virtually, including mobile phones.
VNC Server Advantages
Provides intuitive mouse control.
Gives tried and tested performance.
Supports all major operating systems, such as Linux, MacOS and Windows.
TigerVNC is a free and open source Virtual Network Computing (VNC) server and client software. It works on client/server architecture and allows users to launch and interact with graphical applications on remote machines.
Additionally TigerVNC package is included in the Ubuntu main repository. You can install it by just running the following command:
apt install tigervnc-standalone-server -y
After installing the TigerVNC server package, you can verify the package information using the following command:
apt-cache policy tigervnc-standalone-server
You should get the package information in the following output:
Next, you will need to create a user and set a password for it. You can create a user named user1 by running the following command:
adduser user1
You will need to set a password during the user creation as shown below:
Adding user `user1' ...
Adding new group `user1' (1000) ...
Adding new user `user1' (1000) with group `user1' ...
Creating home directory `/home/user1' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for user1
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
Next, log in to the user1 with the following command:
su - user1
Once you are logged in, set a password for VNC with the following command:
vncpasswd
You will be asked to set a password as shown below:
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
After setting up a password for the VNC server, you can procee to start the VNC server.
At this point, VNC server is installed on your Ubuntu system. You can now start the VNC server with the following command:
vncserver -localhost no
You should see the following output:
New 'ubuntu:1 (user1)' desktop at :1 on machine ubuntu
Starting applications specified in /etc/X11/Xvnc-session
Log file is /home/user1/.vnc/ubuntu:1.log
Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/user1/.vnc/passwd ubuntu:1 to connect to the VNC server.
You can also verify your running VNC server with the following command:
vncserver -list
You should see your active VNC server in the following output:
TigerVNC server sessions:
X DISPLAY # RFB PORT # PROCESS ID
:1 5901 31028
Once you are done, you can proceed to installing and configuring VNC client.
Install VNC Client
After installing and setting up VNC server. You will need to install the VNC client package on the remote machine where you want to connect your VNC server.
1.First, download the VNC client package from the RealVNC website with the following command:
2. After the successfull download. You can install it by running the following command:
dpkg -i VNC-Viewer-6.22.515-Linux-x64.deb
3. After installing the VNC client, you can launch it from the application menu. You should see the VNC Viewer in the following screen:
4. Click on the File => New connection to create a new VNC connection. You should see the following screen:
5. Provide your VNC server IP, connection name and click on the OK button. You should see your created VNC connection on the following screen:
6. Now, double click on your VNC connection. You will be prompt to enter your VNC server password. After the successful authentication, you should see your remote Ubuntu desktop screen:
7. If you want to stop your VNC server. You can stop it with the following command:
vncserver -kill :1
At this point, your VNC server is running and accessible from the remote machine. However, for the production environment, it is recommend to create a dedicated service file to start and stop the VNC service.
It is a good idea to create a systemd service file to manage the VNC service. So you don’t need to start VNC manually. You can create it with the following command:
By default, VNC does not works with the Gnome desktop environment. So you will need to create a xstartup configuration file in your VNC users home directory and define some configurations: This fill will runs automatically whenever you start or restart the VNC server.
Firstly, login with your VNC user with the following command:
su - user1
Next, create a VNC configuration file using the nano editor:
How to Enable Remote Desktop Ubuntu using VNC Conclusion
In this post, we showed you how to enable the remote desktop on Ubuntu using VNC. You can now use VNC to access and manage your Ubuntu desktop machine remotely over the internet. VNC is very useful for system administrator and customer support executive to perform their tasks remotely over the web.
Why don’t you take a look at more Ubuntu content here.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.
00votes
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.