Smokey Start Up

1. Connecting to smokey's VNC:

   Connect to vnc session:
      anycomputer> vncviewer smokey:16000 
   A smokey:16000 vnc is created at boot time, but to manually create it:
      anycomputer> ssh smokey -l smokey

      (vnc session should be: smokey:16000)

   To kill the vnc session on smokey:
      smokey> vncserver -kill :1 
2. Starting Smokey: In the VNC session, open 3 xterms to start the IC, XUI and DV.
   xterm1>  startic

   xterm2>  startxui
            (see not 2.1)

   xterm3>  startdv
   2.1. Initializing Motor Shared Memory
   The motor shared memory is created only if it doesn't exist (allowing
   you to quit and restart the IC, without re-initializing all the motors).

   It you are have motor shared memory issue, you may see
   all with motor icons will be replace with  the words:
      "XUI was unable to access motor information. Motor"
      "control and monitoring is disabled."
   Or if you just wish to delete/create  the shared memory, to this:

      type "die" in the XUI to kill the XUI and IC.
      In the smokey xterm, type:
         /home/smokey/current/mt/mt_sm_init -f

   Then restart the IC and XUI.

3. Normal startup procedures

   1. Make sure the video tab is select, and do a 'go.init' if its status is in error.
   2. Use 'rpcm' or 'telnet acqcampwr', login and turn on #2 video cam

4. Normal shutdown procedures

   1. Set the Gain all the way down.
   2. ND 4.8 filter in.
   3. Exit the vncviewer ( but leave the vncsession and software running).
   4. rpcm or telnet to acqcampwr, and turn off #2 video cam.

5. Shutting down XUI/IC and the PC

   To terminate the XUI & IC, type 'die' in the XUI command prompt or hit cntl-C in the IC xterm.

   If you need to poweroff the smokey pc:
      ssh smokey -l root

6. Setting the "XY Stage IN position"

As the user smokey (on any IRTF computer) edit the smokey startup
file and changed the RA, DEC value for the "xystage.onaxis.radec" line.

  > gedit /home/smokey/current/ic/.smokeyic-init

Remember the .smokeyic-init is only read when the IC is started.

7. What to do when a mechanism is stuck at BUSY

Sometime a mechanism is set to BUSY, and the task die leaving it at a BUSY state, 
but the operation unable to initialize it from the GUI.

The brute for way is to reboot smokey and restart the guider.

But before that, you can try to manual run the mechanism init program to 
quickly recover from this error:

   1. Go to the smokey:16000 vnc.
   2. open an xterm.
   3. do: "cd ~/current/mt"  (the current motor directory).
   4. Run the init program for the mechanism: 
      "xstage_init -v"   - for the X stage 
      "ystage_init -v"   - for the Y stage 
      "pom_init -v"      - for the POM
      "filter_init -v"   - for the filter wheel
      "camera_init -v"   - for the camera mirror stage
      "afocus_init -v"   - for the Apogee camera focus stage 
      "vfocus_init -v"   - for the Video  camera focus stage