Remote Access to the ANU Avance 800 Using VNC

Peter Barron, April 2004

VNC (Virtual Network Computing) was developed by AT &T for remote access. It consists of a server (vncserver) and a client (vncviewer). The package is available for Linux, Irix, Microsoft Windows and Mac OS X - see www.realvnc.com. With Linux distributions it may not be installed in the default installation. With Irix 6.x it must be obtained and installed from the SGI website. For Windows there are at least two shareware packages available, TightVNC and RealVNC. (Under Windows there are some limits to its server capabilities such that remotely accessing a Windows XP system from another Windows XP system is far better done using Microsoft Remote Desktop Connection package. However using Windows 98, 2000 and XP systems as the client to access a Linux vnc server seems to work well)

The basic idea is to start a new desktop, either via local or remote login(ssh), on the spectrometer computer via vncserver, and then access this new desktop either locally or remotely to run applications i.e. XWINNMR. This desktop, and its applications, will continue to run even after logging off remotely and/or locally until it is specifically killed. Hence it is possible to log out of the spectrometer completely and then reconnect later from anywhere and check on the applications running i.e. acquisition under XWINNMR. Note that because the Av800 has only a single XWINNMR license, while XWINNMR is still running under a desktop (vnc or otherwise), no other user can run XWINNMR and interfere with or take over control of the spectrometer and acquisition, even if the user who is currently running it is not logged in. This may at first seem strange that, at the spectrometer, no one appears to be locally logged in and running XWINNMR.

Starting a VNC desktop

1a) Log in locally.
1b) Log in remotely via Secure Shell i.e. from a Linux or Irix system:

ssh username@popeye.anu.edu.au

or from a Windows system using shareware such as Putty Secure Shell in a similar manner.

Note that the first time you try access to a users' account using secure shell an encryption key is exchanged.

2) Start the VNC server. I have put a start up script in everyone's home directory. In a shell type ./vncstart. Alternatively type:

vncserver   -depth   16   -cc   3   1280x1024       (or 1024x768)

Note the desktop number i.e. :1, :2 etc that is given in the output.

 

Accessing the VNC Desktop

1) Locally in a shell type:
  vncviewer   :1       (or vncviewer   :2 etc)

2a) Remotely from a Linux or Irix shell type:

  vncviewer popeye.anu.edu.au:1       (or :2 etc)

2b) Remotely using a Microsoft Windows system use a VNC package such as TightVNC or RealVNC and enter in the pop-up window:

popeye.anu.edu.au:1       (or popeye.anu.edu.au:2 etc)

In both cases you will be asked for the vnc password of the user who started this desktop number. This password can be anything but it is probably best to make it the same as your Linux password. To change or set a users' vnc password, use the command "vncpasswd" in a shell.

Then you will see the new desktop and be able to start XWINNMR. It is possible to have the new desktop appear the same as your normal login i.e. using the kde desktop manager. But running this twice seems to cause some problems. So I have set up each user to run the old and very simple motif window manager, mwm. In this you just open a shell by bringing up a menu by holding down the right mouse button and type "xwinnmr" in the shell. This will limit things you can do outside of XWINNMR to command line stuff in a shell

At any time in both situations above you can kill the vncviewer window without killing the desktop and running applications, and then reconnect later from the same or a different location.

Killing the VNC Desktop

Whilst when you are completely finished with the desktop, there is no need to explicitly kill it, you must at least exit XWINNMR so that the next user can run it. But it is probably best to kill the desktop as well. So exit XWINNMR on the desktop via vncviewer and then either locally open a shell or remotely access the spectrometer with ssh as above and type:

  vncserver   -kill   :1       (or :2 etc)

You will only be able to kill desktops that you have started.

Working with MWM/VNC/XWINNMR

The motif window will come up with RHS and bottom scroll bars. From RealVNC under Windows XP these scroll bars seem to behave normally i.e. can slide them with the mouse. From a Linux RedHat 7.3 client, behaviour seems a bit different - in some situations you need to click on the bar with middle or right button to get them to scroll up/down.

Under motif, you can resize any of the xwinnmr windows by dragging the corner. The windows can be iconized. However restoring requires clicking on the icon to pop up a menu and selecting restore.

Holding down the right button on the motif desktop background brings up a menu from which you can open a shell. Note that shells have buttons for minimize and maximize on the top right corner while a button on the tp left corner brings up a pop-up menu which includes exit to kill the shell (of course you can just type exit in the shell).

With Windows 2000 as the vnc server(not the case with the ANU Av800), it has been observed in one case that the system freezes for a short time after any attempt to move or resize a remote window i.e. the xwinnmr or lock window. You just need to be patient in the case plus minimize these activities.

Using a vnc client via a modem from home is certainly possible but there are speed limitations. Performance will depend on the modem speed you connect at and the level of traffic on your ISP's network. But this should still be useful to check data acquisition at night and weekends for example. It may be advisable to minimize graphics intensive activities i.e.minimize or close lock window, do not go to the acquisition window, do not resize/move windows more than necessary. A broadband connection would however by advisable for regular and full usage of XWINNMR via VNC.

Doing manual phase corrections in XWINNMR, it is necessary to release the mouse button before changing the direction of the phase correction.

In XWINNMR via setres, you can choose what editor you use i.e. vi, kedit, kwrite, xedit etc. Some of these give harmless errors when you exit but they appear to otherwise work ok.


800 MHz NMR home page.