VNC Server on Ubuntu
Remote creation of X Windows sessions.
To enable several users that can independently use their graphical sessions, we set up
vnc4server.
- Install the package as root user:
apt-get install vnc4server
- 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.
- As a regular user (e.g., bcadmin) create your VNC password:
- Create a new X Windows session for the VNC server to make available to the network:
- 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
- To kill this session, you may use this command:
vncserver -kill :1
Killing Xrealvnc process ID xxxx
- In order to run KDE window manager, edit ~/.vnc/xstartup file and replace lines:
Tunneling of session by using Vncviewer -- TODO
VNC X Windows tunneling to Windows XP, using PuTTY
- Before his first connection, prepare PuTTY:
- Finds what is the IP address of the Linux server. E.g. 172.17.120.202
- From the remote Windows XP computer, run PuTTY.
- In the PuTTY configuration window, go to Connection > SSH > Tunnels
- In the Tunnels section of PuTTY, type 5900 for Source port, localhost:5900 for Destination, then click Add
- Go back to the Session section of the PuTTY configuration window
- Type bcadmin@172.17.120.202 for Host Name (or IP address), and click radiobutton SSH
- Give name (e.g. usrv) for Saved Sessions and click Save
- Every time to connect from the remote Windows machine:
- Run PuTTY
- From PuTTY, pick "usrv" saved session, then click Open
- In the PuTTY window, type the password and press Return
- In the PuTTY window, type x11vnc -safer -localhost -nopw -once -display :0 and press Return
- From the same Windows computer, run Real VNC Viewer (All Programs > Real VNC > VNC Viewer 4 > Run VNC Viewer)
- 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: