yum install tigervnc-server xorg-x11-fonts-Type1 xinetd
vi /etc/gdm/custom.conf
[security]
AllowRemoteRoot=true
DisallowTCP=false
[xdmcp]
Enable=true
MaxSessions=30
vi /etc/xinetd.d/vncserver
service vncserver
{
disable = no
socket_type = stream
protocol = tcp
group = tty
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc -securitytypes=none
}
vi /etc/services
vncserver 5900/tcp # VNC and GDM
systemctl restart xinetd.service
firewall-cmd –permanent –zone=public –add-port=5900/tcp
firewall-cmd –reload
Connect using some VNC client:
your_server_IP:5900