Virtual Network Computing (VNC) is a graphical desktop-sharing system that controls remote machines by sending keyboard and mouse events over the network. VNC is particularly useful for remotely controlling Oracle Linux servers that have a graphical desktop environment installed.
You can connect to a VNC server using any compatible software client. VNC is suitable for thin client computing where multiple dumb terminals can share the same hardware resources hosted on an Oracle Linux server.
You can use a different VNC software of your choice.
Steps for Installation and configuration.
- Install a graphical desktop environment along with the VNC service
- Set the VNC Password for a user on the system
- Configure the VNC service for a specific user
- Start and enable the VNC service across subsequent boots
- Access the VNC server from a remote client, either directly or using an SSH tunnel
- Optionally enable x509 encryption for direct VNC access
- Optionally create firewall rules to allow direct VNC access
Prerequisite
- Any system with the latest Oracle Linux installed
- Client software such as TigerVNC/RealVNC
Install a Graphical Desktop Environment
#sudo dnf group install -y "Server with GUI"
#sudo systemctl set-default graphical
#sudo sed '/^#WaylandEnable/s/^#//g' /etc/gdm/custom.conf
Install VNC Server and Set the VNC Password
#sudo dnf install -y tigervnc-server tigervnc-server-module
#vncpasswd
Configure the VNC Service
/etc/tigervnc/vncserver.users file.#echo ":1=$(whoami)"| sudo tee -a /etc/tigervnc/vncserver.users > /dev/null
/etc/tigervnc/vncserver-config-defaults file.#printf 'session=gnome\ngeometry=1280x1024' | sudo tee -a /etc/tigervnc/vncserver-config-defaults > /dev/null
#sudo setenforce 0 #sudo sed -i 's/enforcing/disabled/g' /etc/selinux/config
systemd service.#sudo systemctl daemon-reload
#sudo systemctl enable --now vncserver@:1.service
#netstat -tlnp
#firewall-cmd --permanent --add-port=5901/tcp
#firewall-cmd --reloadOpen a VNC Client and Test Your Deployment
-L option enables local forwarding, which opens a local port to connect through an SSH tunnel to the remote VNC server.ssh -L 5901:localhost:5901 oracle@<your server IP>
:5901 into the VNC Server text box and pressing the Connect button.