This is a brief introduction describing how we use VNC (Virtual Network Computing) to display the various windows which control use of the Hydra CTIO spectrograph. The advantage of using VNC is that support staff (both on the mountain and downtown) can monitor the use of the instrument, actually SEEING in real time any errors that appear. It also lets the observer control both the Arcon and the Hydra GUI from the same keyboard.
First, log into ctiozm with the username hydra (ask the night assistant or Observer Support for the password. Once logged in, click on the README button at the bottom of the screen. This will open a file showing you how to get started.
If Hydra has been up and running, you should only have to click on the Hydra GUI and Arcon window buttons, as the README file says. (These buttons run scripts which reside in /ua80/hydra/bin/: start_a1, view_a1, start_ja, and view_ja, which are named to refer to the computers ctioa1 and ctioa6 which operate Arcon and the Hydra software, respectively).
In short order, two windows should appear. In the tall rectangular window (ctioa1), right click in the desktop to bring up the menu and click on "(Re) Start ARCON Session". In the wide rectangular window (ctioa6), right click in the desktop, move the mouse onto the "Hydra" menu, and click on "Start Hydra Gui". The following images show what should be the result of the instructions above. Click on either for a larger view.
If pressing the buttons produces no result, or the VNC clients start up but the menus appear inaccessible, you will probably have to kill the servers and restart them manually, as follows.
On ctiozm, open an xgterm or xterm window. All of the following commands below (where it says "type...") should be typed into this window.
1. rsh ctioa1 "source .login; vncserver -kill :9"
2. rsh ctioa1 "source .login; vncserver :9 -depth 8 -cc 3 -alwaysshared -geometry 670x864"
This should start the vncserver on ctioa1 and output the following text:
New 'X' desktop is ctioa1:9
Starting applications specified in /arc/hydra/.vnc/xstartup
Log file is /arc/hydra/.vnc/ctioa1:9.log
If line 2 generates an error message about a file in /tmp, remove the file (rsh ctioa1 "rm /tmp/file_name") and try line 2 again.
Clicking the "Open Arcon VNC viewer" button should now bring up the Arcon VNC viewer. If you would rather start the viewer manually ,too, then type
vncviewer ctioa1:9 -passwd /ua71/hydra/.vnc/passwd &
The VNC viewer window should come up, and something like the following output should show up in the xgterm where you typed vncviewer.
VNC server supports protocol version 3.3 (viewer 3.3)
VNC authentication succeeded
Desktop name "hydra's X desktop (ctioa1:9)"
Connected to VNC server, using protocol version 3.3
VNC server default format:
8 bits per pixel.
Colour map (not true colour).
Using default colormap which is TrueColor. Pixel format:
16 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
Using shared memory PutImage
1. rsh ctioa6 "vncserver -kill :9"
2. rsh ctioa6 "source .login; vncserver :9 -cc 3 -alwaysshared -geometry 810x700;"
This should start the vncserver on ctioa6 and output the following text:
New 'X' desktop is ctioa6:9
Starting applications specified in /ua71/hydra/.vnc/xstartup
Log file is /ua71/hydra/.vnc/ctioa6:9.log
Again, if starting the server produces an error message, remove the appropriate file in /tmp and repeat step 2. Clicking the "Open Hydra GUI viewer" button should now bring up the VNC viewer. If you would rather start the viewer manually, type
vncviewer ctioa6:9 -passwd /ua71/hydra/.vnc/passwd &
The VNC viewer window should come up, and something like the following output should show up in the xgterm where you typed vncviewer.
VNC server supports protocol version 3.3 (viewer 3.3)
VNC authentication succeeded
Desktop name "hydra's X desktop (ctioa6:9)"
Connected to VNC server, using protocol version 3.3
VNC server default format:
8 bits per pixel.
Colour map (not true colour).
Using default colormap which is TrueColor. Pixel format:
16 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
Using shared memory PutImage
Sometimes VNC doesn't gracefully let go of the X display it is using (sometimes for a few minutes, sometimes longer). If, for example, one of the VNC servers crashes (which I've never seen happen), and the user immediately tries to restart it, one may get an error saying that VNC is running on :9, even though it isn't. Such an error might look like
hydra@ctiozm% start_a1
A VNC server is already running as :9
[1] 3328
vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server
[1] Exit 1 vncviewer ctioa1:9 -passwd /ua71/hydra/.vnc/passwd
To get around this problem, first try waiting about 2-3 minutes before starting the server again. This should be enough time to allow the socket to be released. If this fails repeatedly, try going through the manual startup and substitute another number, for example 8, whereever you see 9 in the above manual example. This will start up the VNC sessions on X display :8, but otherwise should be the same.
You can bypass VNC completely and start up the windows directly. To do this...
This should bring up the normal Arcon windows directly on the ctioa1 display, and the Hydra GUI on ctioa6.
To connect from other machines, you must (of course) have the VNC viewer application installed. This should be installed on most workstations, and can be downloaded for PCs and Macs from the VNC Homepage.
To view a Hydra session, simply use the VNC viewer application to connect to ctioa1:9 (for the Arcon windows) or ctioa6:9 (for the Hydra GUI). You must know the password to enter. NOTE!! You should ALWAYS enter as VIEWONLY unless you are trying to remotely help the observer. If you do not know how to do this, DON'T CONNECT!
Please send comments and questions to: Roberto De Propris: rdeproprisATctio.noao.edu Last updated: 2 May 2006 by Knut Olsen