Operations 12 min read

Step‑by‑Step Guide to Install and Configure TigerVNC on Rocky Linux 8.9

This tutorial walks through installing TigerVNC on a Rocky Linux 8.9 server, creating VNC users, configuring systemd services, opening firewall ports, and connecting from a Windows 10 client with UltraVNC Viewer, providing all necessary commands and screenshots for a fully functional remote desktop setup.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Step‑by‑Step Guide to Install and Configure TigerVNC on Rocky Linux 8.9

1. Introduction to VNC

VNC (Virtual Network Console) is a remote control tool that allows a client computer to access a server’s graphical desktop. The typical VNC architecture consists of a client program ( vncviewer) and a server program ( vncserver).

2. Test Environment

The server runs Rocky Linux 8.9 (kernel 4.18.0‑513.5.1.el8_9.x86_64) with IP 192.168.3.168. The client is a Windows 10 machine with IP 192.168.3.35.

3. Installing TigerVNC Server

Install the server package from the default yum repository: dnf -y install tigervnc-server Verify the installation: rpm -qa | grep tigervnc Expected output includes tigervnc-server-1.13.1-2.el8.x86_64 and related packages.

4. Creating VNC Users

Create two regular users and set simple passwords (for demonstration only):

useradd vncuser01</code>
<code>useradd vncuser02</code>
<code>echo 123 | passwd --stdin vncuser01</code>
<code>echo 123 | passwd --stdin vncuser02

5. Configuring the VNC Service

5.1 Start VNC for each user

Switch to the first user and launch the server (password must be at least six characters):

su - vncuser01</code>
<code>vncserver

The server creates a desktop :1 and stores configuration in /home/vncuser01/.vnc/. Repeat for the second user, which creates desktop :2.

5.2 View‑only password (optional)

When prompted, answer n to skip a view‑only password.

5.3 Verify listening ports

netstat -tulnp

Ports 5901 and 5902 should be in LISTEN state.

5.4 Enable automatic start

Enable the systemd unit for each display (note the service name cannot be auto‑completed with Tab):

systemctl enable vncserver@:1.service</code>
<code>systemctl enable vncserver@:2.service

5.5 Map displays to users

Edit /etc/tigervnc/vncserver.users to assign displays:

# TigerVNC User assignment
:1=vncuser01
:2=vncuser02

5.6 Open firewall ports

firewall-cmd --add-port=5901/tcp --permanent</code>
<code>firewall-cmd --add-port=5902/tcp --permanent</code>
<code>firewall-cmd --reload

5.7 Verify service status

systemctl status vncserver@:1.service</code>
<code>systemctl status vncserver@:2.service

Both services should be active (running).

6. Client Connection

On a Windows 10 workstation, use UltraVNC Viewer (or any VNC client) to connect to 192.168.3.168:5901 and 192.168.3.168:5902 with the passwords set earlier. Successful login displays the remote desktop for vncuser01 and vncuser02 respectively.

Screenshot examples (client UI) are shown below:

Login succeeded; the same steps apply for the second user.
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

firewallLinuxRemote DesktopVNCRocky LinuxTigerVNC
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.