This loads a font easier to read for people with dyslexia.
This renders the document in high contrast mode.
This renders the document as white on black
This can help those with trouble processing rapid screen movements.

Running AIPS at the ATNF: TV Servers

[ Local servers | Remote servers | VNC session | No servers ]

AIPS has a strong assumption within it that you are using local machine resources, for computation and data display. It is possible to run on a remote server, but AIPS still assumes you will have local display devices:

  • a TV server for image display
  • a MSG server for text messages from tasks you are running
  • and a TEK (Tektronix emulator) server for plots.

There are three approaches you can use to accessing TV and MSG servers from a remote machine:

  1. Run the TV and MSG server on your local machine.
    This will only work for "standard" linux desktops connected to a "standard" linux server at Marsfield. It will not work (for example) logging into a remote server from a laptop or a machine in Perth connecting to Marsfield.
  2. Run TV and MSG server on the remote machine and utilize X11 forwarding via ssh tunneling.
  3. Run a VNC session on the remote machine.

Local TV server for remote host

To do this, your AIPS session on the remote computer needs to start programs running on the computer you are sitting in front of. And doing that involves logging in from the remote computer to the computer you are sitting in front of, without a password.

This requires ssh to be setup to allow the remote machine to ssh back into your local machine without as password. Running the TV server locally makes refreshing the display much quicker, because far less data has to travel across the network. AIPS starts the display by logging back in from the remote machine to your local machine and running the START_TVSERVERS command. This will only work is AIPS has been configure to run on the local machine.

Here's what to do:

  1. Take 5 minutes to set yourself up to log in with SSH keys.
    You only need to do this once.

  2. Start your ssh-agent and load your private key into it:

    localhost% eval `ssh-agent`
    localhost% ssh-add
    Enter passphrase for fred@example:
    localhost%

    Essentially, ssh-agent does your password-typing for you. Once you ssh-add your private keys to the agent, it is able to respond to authentication requests on your behalf, using your keys. Sure, when loading the key you need to type your passphrase, but this is just proving to ssh-agent that the key is yours. You won't have to type your passphrase again, until you stop running the agent.

    The rather odd 'eval' syntax sets up some SSH-related environment variables in the current environment. If you didn't do it this way you would have to make ssh-agent start a shell for you, e.g.:

    localhost% ssh-agent /bin/tcsh

  3. Ensure sshd is running on your machine, for example :

    localhost% ps -ef |grep sshd
    root 3494 1 0 Sep26 ? 00:00:00 /usr/sbin/sshd
  4. Login to the remote machine and check you can log back into your local machine, without a password

    localhost% ssh -A remotehost
    remotehost> ssh LOCALHOST

    Where LOCALHOST is your local host name. The -A option will forward authentication requests from the remote machine to your local ssh-agent. This will allow AIPS on the remote machine to ssh back into your local workstation and run the TV Server program.

  5. Login to the remote machine and start AIPS

    localhost% ssh -A remotehost
    remotehost> aips

ssh-agent on remote machine

If the remote machine does not have sshd running (ie you cannot ssh into it) or you cannot run ssh-agent on your local workstation, you can run ssh-agent on the remote server.

Once you have logged into the remote machine do this:

remotehost> eval `ssh-agent`
remotehost> ssh-add
Enter passphrase for fred@example:
remotehost> aips

...do your AIPS processing...

remotehost> eval `ssh-agent -k`

This sequence starts ssh-agent running, loads the private key into the agent, and starts AIPS. The last command kills the ssh-agent.


Running all services on the remote server

If either the remote or local host are do not have a "standard" linux setup (this includes all laptops), you will need to run TV and MSG servers on the remote machine. AIPS allocates an "ID" to each TV server and does not distinguish between users, ie it is possible to be allocated someone else's TV server. The best way to allocate a new TV server is to request ID 0.

remotehost> aips tv=local:0

This ensures AIPS gives you the next available TV server and does not clobber someone else's.

You can actually exit AIPS and then restart AIPS and reattach to the existing TV server. To do this:

  • Look at the title bar of the display window. It should show a number from 1 to 9, which is the instance number of your TV server.

  • When you restart aips tell it the instance number to use, e.g.

    remotehost> aips tv=local:3

    if the instance number was 3.

Generally when you finish using AIPS, the best approach is to quit with the kleenex command, which will clean up TV and MSG servers.

Running AIPS in a VNC session

The third option for running TV and MSG servers is to run AIPS withing a VNC session. This is by far the best approach if your local machine is physically distant from the remote server (e.g. from Perth or the observatories to Marsfield). VNC sessions also have the advantange of persistency, so your session can stay active when moving a laptop from work to home (for example).

If you have not used VNC before, log onto the machine you want to run AIPS on then:

vncpasswd
chmod +x ~/.vnc/xstartup
vncserver -localhost=no

Take note of the session number of the new session started — on a shared machine it will likely be different every time.

On your local machine you will need to connect to the VNC session. If you are on the same local network as the AIPS host, you can do this:

vncviewer HOSTNAME:N

Where HOSTNAME is the aips host and VNC session number started above (e.g. cetus:6)

If you are not on the same local network as the AIPS host, you will need to ssh tunnel via venice:

vncviewer -via venice.atnf.csiro.au HOSTNAME:N

(See the Local TV server for remote host section regarding setting up SSH tunneling.)

Finally start aips in a terminal on the VNC session,

aips tv=local:0

Note despite the TV and MSG server running on the same host as the display (the VNC session), AIPS gets confused unless you use the tv=local:0 option.


No Servers

Sometimes you just want to start up AIPS and quickly check something, with no extra servers started.

remotehost> aips notv tvok tpok

This prevents AIPS from starting any TV or MSG or TEK servers. You need both notv and tvok. The tpok argument prevents any tape access services from being started as well.