In this tutorial, we will show you how to install VNC Server on AlmaLinux 8. For those of you who didn’t know, VNC stands for Virtual Network Computing (VNC), a system that is used to remotely share and access the screen of computers. It enables users to access the remote computer’s graphical desktop and send mouse clicks and keyboard strokes to the remote system.
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 the step-by-step installation of the VNC Server on an AlmaLinux 8. You can follow the same instructions for Fedora, RHEL, CentOS, and Rocky Linux distributions.
- A server running one of the following operating systems: AlmaLinux 8, Fedora, RHEL, CentOS, or Rocky Linux 8.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, you can harm your system if you’re not careful when acting as the root.
Install VNC Server on AlmaLinux 8
Step 1. First, let’s start by ensuring your system is up-to-date.
sudo dnf update sudo dnf upgrade sudo dnf groupinstall "server with GUI"
Step 2. Installing VNC Server on AlmaLinux 8.
By default, VNC is not available on the AlmaLinux 8 base repository. Now we run the following command below to install TigerVNC on your AlmaLinux system:
sudo dnf install tigervnc-server
Step 3. Configuring VNC Server.
The default configuration files for the
tigervnc-server are located in
~/.vnc/config a directory.
Add the following configuration:
session=gnome geometry=1920x1200 localhost alwaysshared
Save and close the file, Next, configure map the users to a particular port by adding the following option (:x=user) in
sudo nano /etc/tigervnc/vncserver.users
We have done all the necessary configurations up to this point, and we can now start the VNC server:
sudo systemctl enable vncserver@:1.service sudo systemctl start vncserver@:1.service
Step 4. Configure Firewall.
To access the system remotely, the VNC service should be allowed to access, it from the outside world. For that, we have to whitelist its service in the default Firewalld of AlmaLinux 8 permanently. Run the following command to enable it:
sudo firewall-cmd --add-service=vnc-server --permanent sudo firewall-cmd --reload
Step 5. Connecting from Windows.
Now you can able to connect the VNC server using IP and Port ( Example: 192.168.77.21:5 ). From Windows, I typically use Real VNC Viewer. You can download it for multiple operating systems as well, such as Mac, Linux, iOS, Android, and more.
Congratulations! You have successfully installed VNC Server. Thanks for using this tutorial for installing the VNC Server on your AlmaLinux 8 system. For additional help or useful information, we recommend you check the official VNC website.