User Tools

Site Tools


uva_msc_radioastronomy_2013_vnc

What is a VNC (Virtual Network Connection)?

VNC allows remote connections from a client computer to a server, creating a virtual desktop (desktop image) of the server screen on the client computer screen. The user of the client computer can work almost as if (s)he were sitting in front of the screen of the remote computer. VNC continuously compresses and transfers screen shots from the server to the client, which makes for a much faster experience than normal X-forwarding. VNC allows a remote observer to connect to the LOFAR computer cluster.

1. How Do I Get the Necessary Software?

VNC comes with most Linux distributions and is easily set up. Mac and Windows users should download and install a VNC Viewer.

Linux

Install vncviewer software if you don't have any yet.

Then, log in to the LOFAR portal

ssh USER@portal.lofar.eu

Where USER is the lodsXX account you received

Windows

VNC for Windows is freely available from TightVNC (www.tightvnc.com) or from RealVNC (www.realvnc.com).

You will also need an SSH client. An SSH client allows you to make a secure SSH connection from your work/home machine to the LOFAR Linux machines. That is, with SSH client software running on your computer, you can open a terminal window to the remote Linux computer. For Windows users, PuTTY is a freeware SSH client. It is available from www.chiark.greenend.org.uk/~sgtatham/putty/download.html. Although other SSH client software exists (e.g. SSH Secure Shell, Secure CRT), our instructions assume you are using PuTTY.

Thus, remote Window users should:

Download and install VNC unless it is already installed. You need only install the VNC viewer. Download and install PuTTY unless it is already installed on your machine.

Next, start up PuTTY on your Windows machine. A PuTTY Configuration window will appear

In the configuration window, specify the host name, portal.lofar.eu and click on Open to obtain a terminal window to the host. (After specifying the host name, one can choose Save to save the session for future use. If the host name already appears among the Saved Sessions, double click on the host name to open a terminal window to that host.)

Mac OS X

For Mac users, Chicken of the VNC is a good VNC client and is available from sourceforge.net/projects/cotvnc.

Download the Chicken of the VNC disk image file (dmg) and then double-click it to mount it on your desktop. Then drag the Chicken of the VNC icon to your Mac's Applications folder.

Mac OS X includes an SSH client. You can open a terminal by launching either Terminal or X11, both of which are in your Mac's Applications > Utilities folder.

Now

Open a terminal on your local computer and type:

ssh USER@portal.lofar.eu

If you are not using an SSH agent, you will be asked to enter your account username and password (below)

2. Start the VNC session at the LOFAR cluster

As this session will continue to “live” after you log out, you probably only have to do this once.

First set up the “window manager” for your virtual machine:

edit (with pico, vi, etc) the file ~/.vnc/xstartup to be:

#!/bin/sh

icewm-session &

Then, at the prompt on portal type:

vncserver

You can also run vncserver with color depth or window size options. For example:

vncserver [ -geometry 2048×1024 ] [ -depth 8 ] [-pixelformat BGR233]

The first time you run vncserver it will ask you to set up a vnc password. Just use the one that came with your account.

Once you have typed vncserver, the system will reply (e.g.) “New 'X' desktop is portal:2”. In this example the VNC session number is 2. Remember this number since you will need it later. In the instructions below, the VNC session number is designated as n. If n is smaller than 10, use 0n (e.g., 02).

Leave this connection to the server open, as it will be used later to kill processes associated with the VNC session.

3. How Do I Start a VNC Viewer on My Local Machine?

You will need to establish an SSH tunnel and start a VNC viewer in order to view the session on your local machine (work/home). The process is different for each computer platform:

Windows

To establish an SSH tunnel:

Start another instance of PuTTY and bring up another PuTTY Configuration window.

In this second PuTTY window, enter the following information under each Category (listed in the left panel of the window). This information can be saved for future use.

Session - Host Name is portal.lofar.eu (If that host is already listed among the Saved Sessions, click on it and choose Load to place that name in the Host Name section of the window.)

Connection > Data - Enter your account login name as the Auto-login username.

Connection > SSH > Tunnels - Remove any previously used ports with the Remove button. For Source port enter 59n, where n is the VNC session number reported in the first PuTTY window (the VNC server). For Destination, enter localhost:59n . For example: localhost:5902 or localhost:5972 . Then choose Add, then Open.

A terminal screen will open. If you are not using an SSH agent, you will be prompted for your lodsXX account password.

You need type nothing else in this window except exit at the end of the VNC session. The existence of this window serves only to provide the tunnel from your Windows machine to the Green Bank system.

To start the VNC viewer:

Start the VNC viewer on your Windows machine. If using TightVNC, please select the viewer having the “best compression.”

A popup window will appear, VNC Viewer: Connection Details.

Click on Options. Search for and select the option for sharing the connection and then click OK.

For Server enter localhost:n, where n is the VNC session number, as before (but here, without preceding zero).

Next a VNC Viewer: Authentication window will pop up. Enter your vncserver password

Linux

To establish an SSH tunnel AND start a VNC viewer, open a terminal on your local computer and type:

vncviewer -shared -via YOURLOGIN@portal.lofar.eu localhost:n

Replace n with the desktop number from the previous step and YOURLOGIN with the name of your account.

The -shared option allows support staff to “snoop” on your session when assisting you.

If you are not using an SSH agent, you will be prompted for your lodsXX account password.

You will next be prompted for your VNC password. Use the same password. You will be asked for this password regardless of whether or not you have an SSH agent running.

Note: If your Linux version does not support the -via option you might want to install Tight VNC (www.tightvnc.com) or use the following equivalent to -via:

Open a terminal on your local computer and type:

ssh -N -C -L 590n:localhost:590n YOURLOGIN@portal.lofar.eu

Open a terminal on your local computer and type:

vncviewer localhost:n

The VNC Viewer window to the lofar portal will now appear.

Max OSX

To establish an SSH tunnel, open a terminal on your Mac and type:

ssh -N -C -L 590n:localhost:590n YOURLOGIN@portal.lofar.eu

Replace n with the desktop number from the previous step and YOURLOGIN with the name of your account.

To start a VNC viewer, launch Chicken of the VNC from your Mac's Applications folder:

A VNC Login window will appear on your Mac's desktop.

Set Host to localhost, set Display to n, enter your VNC password, check Remember Password, and check Allow other clients to connect.

Hit the Connect button.

The VNC Viewer window to lofar will now appear.

Troubleshooting

If you get the error “no free display number on machine”, use the lofar backup portal. In the above instructions, substitute portal.lofar.eu everywhere with 195.169.3.218 .

uva_msc_radioastronomy_2013_vnc.txt · Last modified: 2013/04/16 15:54 by leeuwen