- Abrimos una ventana de Terminal (menú Aplicaciones >> Accesorios >> Terminal). Escribimos “vncpasswd“, pulsamos INTRO, nos pedirá el password para control remoto, la introducimos y nos pedirá repetirla.
Password:
Verify:
- Escribimos el comando “vi /etc/sysconfig/vncservers“. Pulsamos “INTRO“.
- Pulsamos “i“, para escribir. Nos situamos con las teclas de dirección en la línea a editar. Descomentaremos las líneas, quitando los símbolos “#” y deberemos dejar el fichero como aparece aquí:
# 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
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.
# Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.
# Use “-nohttpd” to prevent web-based VNC clients connecting.
# 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=”2:root”
VNCSERVERARGS[2]=”-geometry 1024×768″
- Pulsamos “ESC“. Y escribimos “:wq“, para guardar y cerrar la edición.
- Hacemos que vnc esté activo al arranque. Escribimos el comando “chkconfig vncserver on“
- Para iniciar el servicio escribimos “service vncserver start“
- En principio, ya tendríamos acceso por VNC al servidor. Ahora vamos a configurar VNC para que se vea un escritorio remoto con todas las funciones. Escribimos “vi /root/.vnc/xstartup“
- Editamos el fichero pulsando “i”, y quitamos los símbolos “#” de la tercera y cuarta línea(en azul), y lo dejamos de esta forma:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
twm &
Pulsamos “ESC“. Y escribimos “:wq“, para guardar y cerrar la edición.
10. Reiniciamos el servicio para que los cambios tengan efecto, con el comando “service vncserver restart”
11. Para conectarnos desde nuestra máquina necesitaremos tener instalado VNCViewer. Y deberemos escribir, al ejecutar el programa, “IP_SERVIDOR:2” o “NOMBRE_SERVIDOR:2“
Te ha gustado la entrada SGUENOS EN TWITTER O INVITANOS A UN CAFE?