Recipes » VNC Server on Ubuntu

VNC Server on Ubuntu

Last modified by Administrator on 2011/06/06 17:26

VNC Server on Ubuntu

Linux en

Remote creation of X Windows sessions.

To enable several users that can independently use their graphical sessions, we set up vnc4server.

  1. Install the package as root user:
    apt-get install vnc4server
  2. Make sure that vncserver symlink indicates the right implementation:
    update-alternatives --config vncserver
    - this should print
    (/usr/bin/vnc4server). Nothing to configure.
    In other cases pick the right vncserver implementation.
  3. As a regular user (e.g., bcadmin) create your VNC password:
    vncpasswd
  4. Create a new X Windows session for the VNC server to make available to the network:
    vncserver
  5. You should see the following message:
    New 'X' desktop is hostname:1
    Starting applications specified in /etc/X11/Xsession
    Log file is /home/username/.vnc/hostname:1.log
  6. To kill this session, you may use this command:
    vncserver -kill :1
    Killing Xrealvnc process ID xxxx
  7. In order to run KDE window manager, edit ~/.vnc/xstartup file and replace lines:
    # twm &
    startkde &

Tunneling of session by using Vncviewer -- TODO

VNC X Windows tunneling to Windows XP, using PuTTY

  1. Before his first connection, prepare PuTTY:
    1. Finds what is the IP address of the Linux server. E.g. 172.17.120.202
    2. From the remote Windows XP computer, run PuTTY.
    3. In the PuTTY configuration window, go to Connection > SSH > Tunnels
    4. In the Tunnels section of PuTTY, type 5900 for Source port, localhost:5900 for Destination, then click Add
    5. Go back to the Session section of the PuTTY configuration window
    6. Type bcadmin@172.17.120.202 for Host Name (or IP address), and click radiobutton SSH
    7. Give name (e.g. usrv) for Saved Sessions and click Save
  2. Every time to connect from the remote Windows machine:
    1. Run PuTTY
    2. From PuTTY, pick "usrv" saved session, then click Open
    3. In the PuTTY window, type the password and press Return
    4. In the PuTTY window, type x11vnc -safer -localhost -nopw -once -display :0 and press Return
    5. From the same Windows computer, run Real VNC Viewer (All Programs > Real VNC > VNC Viewer 4 > Run VNC Viewer)
    6. In TightVNC Viewer, he types localhost:0 for VNC server and presses Connect.
Sometimes direct access to X Windows session is not possible, because it is limited by a firewall. In this case tunnel this through a ssh connection. With PuTTY you can do this as follows: http://www.strw.leidenuniv.nl/local/computers/it_local/tunnels/putty-X-tunnel.html


Tags:  

Tags:
Created by Kalvis Apsītis on 2009/09/05 13:23

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 3.0.36132 - Documentation