Advance

How to Install and Configure VNC on Fedora

How to Install and Configure VNC on Fedora
1
(1)

VNC stands for Virtual Network Computing, a software for monitoring server status when the network is down and unavailable. You can use VNC to view and check the current status of your server. VNC acts as the user interface with the graphical interface of the operating system (remote desktop). In other words, VNC sends the server monitor image to your computer. The software also delivers information about the keyboard or mouse keys that you press. With this software, you can easily connect to the server and work with it as your own computer. Join us in this article to learn How to Install and Configure VNC on Fedora. You can also visit the packages available in Eldernode to purchase a Linux VPS server.

Tutorial Install and Configure VNC on Fedora

VNC, also known by many as a console, is used to monitor server status during network outages and lack of access. With VNC you can see the status of your server. You can also check the problem of not being able to access your server. Many servers hang when booting, or SSHD service may not work properly on Linux servers, remote desktops may be disabled on Windows VPS servers, and many other software problems. With VNC you can enter the server and use it to check and solve the problem.

Follow us in the continuation of this article.

Recommended Article: Tutorial Install and Configure Fail2ban on Fedora 33

VNC Applications (Install and Configure VNC on Fedora 33)

VNC applications include the following:

1- To work in Linux remote graphical environment

Due to the high stability of the Linux operating system, Linux distributions are often used on servers. Some Linux distributions do not have a graphical interface. So first you need to install the KDE or Gnome graphical interface on them. Now that Linux has a graphical interface, you need to connect to it in some way. Then install and configure VNC on the server. Now you can access and manage your Linux server graphical environment using programs that establish a VNC connection.

2- Access to VPS server when network disruption or SSH service is not available

Sometimes due to various problems such as not recognizing the network card by the Virtual Machine, etc., your network connection to the VPS server is disrupted. Or the SSH Server service is not available for any reason. In these cases, VNC can act as a bridge to the server and connect to the server.

3- Installing the operating system on the VPS server

One of the easiest ways to install an operating system on a VPS server is to use a VNC. With VNC you can easily boot your operating system on the VPS server and perform the installation steps.

Install VNC on Fedora step by step

In this section, we decide to install a lightweight VNC server package, TigerVNC. It should note that this package is suitable even for low-speed internet. Then we use SSH to create a secure tunnel to that VNC server. This article will guide you through the installation of the XFCE desktop environment, which you can use to connect VNC from a remote location.

The first step is to use the following command to install XFCE on the Fedora server:

dnf install @xfce-desktop-environment

Then in the next step, you must install the TigerVNC server package by executing the following command:

dnf install tigervnc-server

How to Create a VNC user on Fedora 33

It should be noted that you must have an SSH login as the root user disabled to your server for security reasons. instead, log in remotely through other users that have Sudo privileges. Then it is necessary to create a new user with Sudo permissions. This new user can access the VNC server remotely. Using the following commands you can create a new user and set the server password:

sudo useradd -m -s /bin/bash myvncuser
sudo passwd myvncuser

In the next step, you must add your new user to the wheel group using the following command to grant root privileges:

sudo usermod -a -G wheel myvncuser

Finally, you can log in as the new user by running the following command:

su - myvncuser

How to Run VNC Server

In this section, we will run the VNC server to create installation files for the first time. In this tutorial, the cloud server name is Elder-puffin-86. You can run the initial value of the VNC server for your user for the first time using the following command:

myvncuser@Elder-puffin-86:~$ vncserver

As you can see in the output below, you will be asked to create a view-only password. The view-only password is using to provide a user with a shared screen view, but they will not be able to control the mouse or keyboard:

You will require a password to access your desktops.    Password:  Warning: password truncated to the length of 8.  Verify:  Would you like to enter a view-only password (y/n)? y  Password:  Warning: password truncated to the length of 8.  Verify:  xauth: file /home/myvncuser/.Xauthority does not exist  xauth: (argv):1: bad display name "Elder-puffin-86:1" in "add" command  xauth: file /home/myvncuser/.Xauthority does not exist    New 'X' desktop is Elder-puffin-86:1  127.0.0.1 localhost    Creating default startup script /home/myvncuser/.vnc/xstartup  Starting applications specified in /home/myvncuser/.vnc/xstartup  Logfile is /home/myvncuser/.vnc/Elder-puffin-86:1.log

How to Configure VNC on Fedora

Now that you’ve been able to set up a VNC server for the first time, you need to configure some basic files. Perform these settings to run automatically whenever the VNC server is set up.

The first step is to stop the running VNC server process:

vncserver -kill :1

Note: Since VNC runs on server port 5901 by default, when working with a VNC server, the command line is as follows :1. VNC can also be run on multiple display ports. In this way, 5902 can be labeled as :2, 5903 as :3, etc.

Next, you need to back up the default startup script file using the following command:

mv ~/.vnc/xstartup ~/.vnc/xstartup.bak

Then you can create a new “xstartup” file using your favorite text editors such as nano or vim:

vim ~/.vnc/xstartup

Now you need to put the following commands in the new file you created. Then save it.

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

Since we require the VNC server to execute other commands during startup, you must grant executable privileges to your new startup file:

sudo chmod +x ~/.vnc/xstartup
Recommended Article: How to Install and Configure VNC on Fedora

Conclusion

Usually, because the VNC tool is known for monitoring the status of servers, it may be unclear whether this is a monitoring tool or not. You should note that this tool is a graphical interface and is actually a server screen. In this article, we tried to teach How to Install and Configure VNC on Fedora. If you want to install and configure VNC on CentOS, Ubuntu 20.04, and Debian, you can refer to these articles.

How useful was this post?

Click on a star to rate it!

Average rating 1 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day