How to Install and Configure VNC Server on CentOS Stream 9

To install and configure VNC Server on CentOS Stream 9, follow the steps below.

Step 1 : Update the system packages using the following command:

Step 2 : Install the EPEL repository:

Step 3 : Install the Xfce and base-x groups:

Step 4 : Set the default graphical target:

Step 5 : Install the TigerVNC Server package:

Step 6 : Set up the VNC password using the following command:

Step 7 : Create and edit the xstartup file using the following command:

Add the following lines to the file:

Step 8 : Edit the vncserver.users file and add the following line (replace :1 with the appropriate display number):

Add:

Step 9 : Reload the systemd configuration:

Step 10 : Start the VNC Server for the specified display:

Step 11 : Enable the VNC Server to start on boot:

Step 12 : Check the status of the VNC Server:

Step 13 : If you are using a firewall, configure it to allow VNC traffic:

Step 14 : Connect to your VNC server.

If prompted about an unencrypted connection, proceed.

Step 15 : Login using the VNC password set earlier.

Step 16 : Access your Xfce Desktop Environment through the VNC connection.

Congratulations, you have successfully installed and configured VNC Server on CentOS Stream 9.