Siguiendo el documento de configuración de la web de DarkScripts hemos configurado el TightVNC en un nuevo servidor basado en Red Hat EL. Concretamente en nuestra instalación hemos configurado el usuario admin para estas tareas, vinculándolo al display :1, lo que obliga al acceso al servidor por el puerto 5901.

[root@server ~]# cat /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my ‘myusername’ (adjust this to your own). You will also
# need to set a VNC password; run ‘man vncpasswd’ to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see this URL:
# http://kbase.redhat.com/faq/docs/DOC-7028

# Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.

# Use “-localhost” to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the “-via” option in the
# `man vncviewer’ manual page.

VNCSERVERS=”1:admin”
VNCSERVERARGS[1]=”-geometry 1024×768″

[root@server ~]# useradd -d /home/admin admin
[root@server ~]# passwd admin
Changing password for user admin.
New password: *password*

Retype new password: *password*

passwd: all authentication tokens updated successfully.

[root@server ~]# su – admin
[admin@server ~]$ vncpasswd
Password:
Verify:
[admin@server ~]$ cat .vnc/xstartup
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[root@server ~]# service vncserver start
Starting VNC server: 1:admin
New ‘server:1 (admin)’ desktop is server:1

Starting applications specified in /home/admin/.vnc/xstartup
Log file is /home/admin/.vnc/server:1.log

[ OK ]
[root@server .vnc]#

Es importante recordar que el acceso se realiza por el puerto 5901 y no por el puerto por defecto (5900).