Desktop Environment : Configure VNC Server2021/07/19 |
Install VNC Server to connect to Rocky Linux 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 success [root@dlp ~]# firewall-cmd --runtime-to-permanent success |
[3] | |
[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 [rocky@dlp ~]$ vncpasswd Password: Verify: Would you like to enter a view-only password (y/n)? n
[rocky@dlp ~]$
vi ~/.vnc/config # create new # session=(display manager you use) # securitytypes=(security options) # geometry=(screen resolution) session=gnome securitytypes=vncauth,tlsvnc geometry=800x600 |
[5] | Configure settings with root privilege ans start Systemd Unit. |
[root@dlp ~]#
vi /etc/tigervnc/vncserver.users # add to the end # specify [:(display number)=(username] as comments # 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
:1=rocky
:2=redhat
# start systemd unit [root@dlp ~]# systemctl enable --now vncserver@:1 vncserver@:2
|
[6] |
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. |
Sponsored Link |
|