VNC Server

Remote Access to your Linux System

  • ssh (putty) to server (your own login not root)

    Install the VNC server if it's not already installed:

  • sudo apt-get install vnc4server (Ubuntu/Debian)
  • yum install vnc-server (Fedora/CentOS/RedHat)

    Start the VNC server on screen 1

  • vncserver :1
    You'll be asked to enter a VNC password the first time it's started

    If you leave off the screen number it will automaticly assign the next available screen.

    Now start the TightVNC client on Windows and connect to myVNCserver:1

    To kill the VNC server:

  • vncserver -kill :1

    You'll want to use Gnome instead of twm:
    edit .vnc/xstartup and make these changes at the end:
    #twm &
    /usr/bin/gnome-session &

    You'll need to open the firewall on your server for VNC

    See the example to edit /etc/sysconfig/iptables here.

    To start the server with different geometry or color depth:

  • vncserver :1 -geometry 1024x768 -depth 16
    Updated: Wed Sep 15 23:11:04 PDT 2010