As VNC is not a secure way to connect to your linux server, you can run VNC over an SSH connection, here is how First install your vnc server - For Fedora and CentOS <p class="codigo">yum install vnc vnc-server</p>

  • For Debian and Ubuntu

apt-get install vncserver

Configure your VNC server

  • Run this command, this will start your vncserver running in “possition” 20, with 8 bits of colour and a screen of 1024x768

vncserver :20 -depth 8 -geometry 1024x768

  • Stop the server use this other command

vncserver -kill :20

  • Edit the applications file, to have your GNOME or KDE running when you connect to the PC using VNC

** Only for Fedora and CentOS **

vi ~/.vnc/xstartup

  • Here be sure you have a content like this
# Uncomment the following two lines for normal desktop:
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 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &

Configure Putty on Windows

  • Open VNCViewer on your windows and point to your localhost:20

  • You should see something like this.

Special Thanks to Guy Boisvert and Theo Band