Install vnc server and xinetd
yum -y install vnc-server xinetd
Configure xinetd:
chkconfig xinetd on
Create /etc/xinetd.d/xvncserver
service vnc-640x480x8 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 640x480 -depth 8 -SecurityTypes none } service vnc-800x600x8 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 800x600 -depth 8 -SecurityTypes none } service vnc-1024x768x8 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1024x768 -depth 8 -SecurityTypes none } service vnc-1280x1024x8 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1280x1024 -depth 8 -SecurityTypes none } service vnc-1600x1200x8 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 8 -SecurityTypes none } service vnc-640x480x16 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 640x480 -depth 16 -SecurityTypes none } service vnc-800x600x16 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 800x600 -depth 16 -SecurityTypes none } service vnc-1024x768x16 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1024x768 -depth 16 -SecurityTypes none } service vnc-1280x1024x16 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1280x1024 -depth 16 -SecurityTypes none } service vnc-1600x1200x16 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 16 -SecurityTypes none } service vnc-640x480x24 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 640x480 -depth 24 -SecurityTypes none } service vnc-800x600x24 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 800x600 -depth 24 -SecurityTypes none } service vnc-1024x768x24 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1024x768 -depth 24 -SecurityTypes none } service vnc-1280x1024x24 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1280x1024 -depth 24 -SecurityTypes none # port = 5973 } service vnc-1600x1200x24 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 24 -SecurityTypes none } service vnc-640x480x32 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 640x480 -depth 32 -SecurityTypes none } service vnc-800x600x32 user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 24 -SecurityTypes none } service vnc-640x480x32 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 640x480 -depth 32 -SecurityTypes none } service vnc-800x600x32 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 800x600 -depth 32 -SecurityTypes none } service vnc-1024x768x32 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1024x768 -depth 32 -SecurityTypes none } service vnc-1280x1024x32 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1280x1024 -depth 32 -SecurityTypes none } service vnc-1600x1200x32 { protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 32 -SecurityTypes none }
Add ports to /etc/services:
# # VNC Servers # vnc-640x480x8 5950/tcp vnc-800x600x8 5951/tcp vnc-1024x768x8 5952/tcp vnc-1280x1024x8 5953/tcp vnc-1600x1200x8 5954/tcp vnc-640x480x16 5960/tcp vnc-800x600x16 5961/tcp vnc-1024x768x16 5962/tcp vnc-1280x1024x16 5963/tcp vnc-1600x1200x16 5964/tcp vnc-640x480x24 5970/tcp vnc-800x600x24 5971/tcp vnc-1024x768x24 5972/tcp vnc-1280x1024x24 5973/tcp vnc-1600x1200x24 5974/tcp vnc-640x480x32 5980/tcp vnc-800x600x32 5981/tcp vnc-1024x768x32 5982/tcp vnc-1280x1024x32 5983/tcp vnc-1600x1200x32 5984/tcp
Allow XDMCP in gdm, by editing /etc/gdm/custom.conf:
[security] DisallowTCP=false [xdmcp] Enable=true HonorIndirect=false
OK now start everything up:
service xinetd start
And bounce Xorg (you may need to change runlevels):
init 3 init 5
Private
No