AlmaLinux 9
Sponsored Link

Desktop Environment : VNC Client : noVNC2023/02/24

 
Install noVNC which is a VNC Client tool to connect to VNC server via Web Browser.
[1] Install required packages.
# install from EPEL

[root@dlp ~]#
dnf --enablerepo=epel -y install novnc python3-websockify python3-numpy
# if Firewalld is running, allow ports

[root@dlp ~]#
firewall-cmd --add-port=6080/tcp

[root@dlp ~]#
firewall-cmd --runtime-to-permanent

[2]
Start VNC Server for users, refer to here.
This example is based on that a VNC service for [alma] user runs with [5901] port.
[3] Login as a user who runs VNC and create certificates, and then Start novnc_proxy to proxy [localhost:5901] on port [6080].
[alma@dlp ~]$
openssl req -x509 -nodes -newkey rsa:3072 -keyout novnc.pem -out novnc.pem -days 3650

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:JP                                      # country code
State or Province Name (full name) []:Hiroshima                           # state
Locality Name (eg, city) [Default City]:Hiroshima                         # city
Organization Name (eg, company) [Default Company Ltd]:GTS                 # company
Organizational Unit Name (eg, section) []:Server World                    # department
Common Name (eg, your name or your server's hostname) []:dlp.srv.world    # server's FQDN
Email Address []:alma@srv.world                                           # admin email

[alma@dlp ~]$
novnc_proxy --listen 6080 --cert ~/novnc.pem --vnc localhost:5901 --ssl-only

Using installed websockify at /usr/bin/websockify
Starting webserver and WebSockets proxy on port 6080
WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /usr/share/novnc
  - SSL/TLS support
  - Deny non-SSL/TLS connections
  - proxying from :6080 to localhost:5901


Navigate to this URL:

    https://dlp.srv.world:6080/vnc.html?host=dlp.srv.world&port=6080

Press Ctrl-C to exit
[4] Access to the URL that is displayed when you run noVNC above from a client computer with web browser, then noVNC form is displayed like follows, Click [Connect] to proceed.
[5] Password is required. Input VNC password of the user VNC runs.
[6] If successfully passed authentication, VNC session starts and it's possible to operate AlmaLinux on Web browser.
Matched Content