• Webconn Technology
    • GPU Server
      • Dedicated GPU Servers with NVIDIA RTX/A100 GPUs for accelerated AI training, rendering, and scientific computing. Features CUDA cores, 24GB-141GB VRAM, and parallel processing. Pre-configured with TensorFlow/PyTorch.

      • nvidia rtx A6000
    • Dedicated Server
      • Experience blazing-fast speeds & ironclad security with your own dedicated server. No shared resources. Fully customizable plans for gaming, e-commerce, and big data. Start now!

      • datacenter
    • Shared Hosting
      • Get user-friendly DirectAdmin shared hosting for your website. Enjoy an intuitive control panel, one-click app installs, and reliable performance. Perfect for blogs, small business sites, and portfolios.

      • shared hosting web
    • Domains
      • Search and register the perfect domain name for your website. Get a memorable .com, .net, .org or niche TLD to start building your brand online. Includes free privacy protection.

      • domain names register
    • VPS
      • Experience the power of a dedicated server without the high cost. Our VPS hosting guarantees CPU, RAM, and storage for your site, ensuring optimal performance and stability.

      • vps hosting
  • Blog
  • Dashboard

How to configure VNC server in AlmaLinux 8.3

Category:

Solution

Install the required VNC server packages in AlmaLinux 8.3 as follows:

yum -y install tigervnc-server tigervnc

The default configuration files for the tigervnc-server are located in /etc/tigervnc. In this directory, the following files are present.

vncserver.users
vncserver-config-mandatory
vncserver-config-defaults

Map the users to a particular port by adding the following option (:x=user) in /etc/tigervnc/vncserver.users file.

:1=vnc-user1
:2=vnc-users2

You should configure one vnc session per user as AlmaLinux 8.3 only supports one unique user per GUI session per machine.

Now you will have to edit vncserver-config-defaults file to configure Xvnc parameters. The values in this file will be applied to every user unless the user has its own configuration file in $HOME/.vnc/config. The same options with different values are set in vncserver-config-mandatory file, which replaces the default configuration file and has a higher priority. The format of the configuration file is option=value.

session=gnome
#securitytypes=vncauth,tlsvnc
#desktop=myserver
#geometry=1900x1100
#localhost
#alwaysshared

Make sure the parameter session=gnome in the above code matches the name of the session desktop file in the/usr/share/xsessions directory (case-sensitive).

Run the following command to start the Tigervnc server. This command should be run as a user who will be starting and using the vnc server. The vnc password must be set while the user is logged in and not by the root.

vncpasswd

As root, start the Tigervnc server as follows:

# systemctl enable vncserver@:$x.service
# systemctl start vncserver@:$x.service

In the above command, you should replace the variable $x by the actual number configured in /etc/tigervnc/vncserver.users

systemctl enable vncserver@:1.service --now

Open vnc default port 5901 in the firewall as follows:

firewall-cmd --permanent --zone=public --add-port 5901/tcp

Reload firewall.

firewall-cmd --reload

Leave a Reply