CentOS Stream 8
Sponsored Link

Desktop Environment : Configure VNC Server2021/02/23

Install VNC Server to connect to CentOS Stream Server with GUI from remote client computer.
[1] Install Tigervnc Server.
[root@dlp ~]#
dnf -y install tigervnc-server
[2] If Firewalld is running, allow VNC service.
[root@dlp ~]#
firewall-cmd --add-service=vnc-server --permanent

[root@dlp ~]#
firewall-cmd --reload

[4] The wrapper script [vncserver] command on Tigervnc is deprecated and will be replaced with Systemd Unit.
If you use Systemd Unit, configure like follows.
Configure VNC settings on each user first and next, start Systemd Unit with root privilege.
# set VNC password

[cent@dlp ~]$

Would you like to enter a view-only password (y/n)?
[cent@dlp ~]$
vi ~/.vnc/config
# create new

# session=(display manager you use)

# securitytypes=(security options)

# geometry=(screen resolution)

[5] Configure settings with root privilege and start Systemd Unit.
[root@dlp ~]#
vi /etc/tigervnc/vncserver.users
# add to the end

# specify [:(display number)=(username]

# display number 1 listens port 5901

# display number n + 5900 = listening port

# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
# :2=andrew
# :3=lisa

# start systemd unit

[root@dlp ~]#
systemctl enable --now vncserver@:1 vncserver@:2
Install VNC Viewer on client computer to connect to VNC server.
This example is based on Windows 10 and UltraVNC.
Download UltraVNC from the site below.
⇒ https://www.uvnc.com/downloads/ultravnc.html
After installing UltraVNC, click [UltraVNC Viewer] to run, then, following window is shown.
Input [(Server's hostname or IP address):(display number)] like following example and then click the [Connect] button.
[7] VNC password is required to input for authentication.
[8] If successfully passed authentication, VNC session starts like follows.
Matched Content