DIRECTOR (this is version `2') DO NOT SET this externally! Director sets it to an appropriate value so agents know what version of director they are running under. SESSIONHOST If unset, director will set this to the current hostname. If it is set but it doesn't agree with the current hostname, director will issue a warning and keep the value you have set. The symbolic link file ~/.director/sessionhost overrides this. DISPLAY If unset, director sets this to SESSIONHOST:0.0. USER and HOME After a userid for a director session has been determined (either that passed with `-k' or getuid() if no `-k') director overrides these two variables to agree with information from the passwd table. The original settings of these variables have no effect on director or its agents. PATH User's current path is sent to agent as-is. LINES and COLUMNS Ignored (set to 0 to force ncurses to determine window size on its own.) CFHTCONFPATH Defaults to /cfht/conf. CFHTLOGS Log messages from agents running within director are also written here using cfhtlog() calls. The message type is determined from the first few characters in a line printed by the agent. For example, a string starting with `error:' is written as CFHT_ERROR, etc. See also `-hs'. Defaults to /tmp/pipes/syslog.np. CFHTLOGU If this file (fifo) does not exist, or if no other process is currently reading from it, it is opened. Messages written to this node by other programs are echoed in the director feedback area. FFTEMPLATE Passed on to the agent. If not found, defaults to ~/.,template When the agent runs on another host, these are the ONLY variables it should expect to have defined.
String parsing rules: ('^'->beginning of a line) OUTPUT FROM AGENT: ^status: displays green, logs as CFHT_STATUS ^logonly: displays brown, logs as CFHT_LOGONLY ^debug: displays brown, logs as CFHT_DEBUG ^warning: displays yellow, logs as CFHT_WARN ^error: displays red, logs as CFHT_ERROR Any line on stderr is at least a CFHT_WARN, so C agents can use perror(). All other lines are not logged, but display in various areas of the screen: ^statusbar: creates status bar (if needed); displays text in reverse video ^titlebar: displays text in window title (if TERM=xterm or rxvt only) ^infoN: (where N is 1..9) displays on info panel if infosize >= N ^instant: displays text in user prompt area until command completes ^* displays with highlighted background (including the *) ^ok> command completed ok *handled internally by cli_getline() ^failed> last command failed *handled internally by cli_getline() \a(bell) rings the terminal bell immediately (and eats the character) ... all other lines scroll in white in the feedback area long lines are word-wrapped to fit the current window size INPUT AT PROMPT, COMMAND PROMPT, OR FROM SCRIPT: ~ or ~user basic shell-style tilde-substitution is done by director builtin (where `builtin' is a director builtin command) runs immediately other (where `other' is any other command) put in queue for agent @cmd runs cmd as above but does not echo the command itself to window -cmd runs cmd as above but does not abort a script if this command fails {PID}cmd runs cmd as above; when it returns director signals PID with: SIGUSR1 if command returned PASS (prompt was ^ok>) SIGUSR2 if command returned FAIL (prompt was ^failed>) *handled internally by cli_cmd() or the shell utility `clicmd'
Director is free software. It is distributed under the terms of the GNU General Public License version 2. If you modify it, please make sure this is clearly advertised when the program starts up.
Most Linux systems already contain the necessary prerequisites for building and installing Director.
Director has been tested on HP-UX 9 and 10, SunOS 4.1, Solaris 2.x and Solaris 7, but only after installing a bunch of GNU software to make these systems look more like a Linux system. Most importantly, GNU make, the GNU C compiler, and the ncurses library (defaults on Linux, but not many other unix platforms) are required to build Director. If any of these are installed in a place other than /usr/local, be sure to edit Make.Common so Director's Makefile system can find them.
You'll want to install these items in the order given below. All GNU packages are available from ftp://ftp.gnu.org/pub/gnu/. The versions indicated are the versions that we are using. Most likely later versions (and possibly some older versions) will work as well.
rxvt|xterm-color|reduced xterm terminal (X Window System), kf1=\E[11~,kf2=\E[12~,kf3=\E[13~,kf4=\E[14~,khome=\E[7~,kend=\E[8~, use=vt100, use=ecma+color,After that you have to do a ``make install'' in the misc subdirectory to install the new terminfo. One way to be sure things will work correctly would be to use our version of rxvt and our version of ncurses, as they are known to work together. The tar files can be downloaded from the http://software.cfht.hawaii.edu/megacam/ page. Then you won't have to worry about patching anything at all.
director3 -t xterm-color ... director3 -t color-xterm ... director3 -t rxvt ...
If one of these terminal types turns on color support for you, you could also make that the default by putting it in the COLORTERM environment variable.
I have also managed to compile rxvt, ncurses, and Director under Windows NT using the cygwin32 GCC from Cynus Solutions (now RedHat). With some tweaking, Director should run properly under Windows NT (and possibly Windows 95). Without named pipes, however, its functionality will be somewhat limited on that platform.
A mirror of the man pages for rxvt are available on this site, and are also included with the tar file, along with a ``vga.pcf'' font. Again, all of this may already exist on other Linux installations, and under modern Solaris, HPUX, and others, xterm will probably work fine. If it comes up without color, try ``director -t xterm-color ...''.
Links to some documentation on ncurses and its libraries are included in the tar file, and at on this site.
/usr/local /cfht /opt/cfht /home/bob/cfht
WARNING: At the moment, /usr/local/cfht/ and /local/cfht/ in particular do NOT work as PREFIX, unless you create a symbolic link in root (/cfht) pointing to this directory.
cd /opt/cfht ; gzip -dc ~/director-and-detcom-3.31.tgz | tar xvf -
When you are finished, you should something similar to this:
/opt/cfht/src/Make.Common (Shared Makefile stuff) /opt/cfht/src/ThisIsTopLevel (Marker used by Make.Common) /opt/cfht/src/cli -> (Symlink to the current version) /opt/cfht/src/cli-3.31/... (Complete source tree and libraries) /opt/cfht/src/fh -> (FITS Header library used by DetCom) /opt/cfht/src/detcom -> (Symlink to the current version) /opt/cfht/src/detcom-3.31/... (DetCom source code.)
Note: after building and installing, files will appear in:
/opt/cfht/obs/PROJECT/... (Unstripped programs and object files) /opt/cfht/lib/libNAME.a (Archive libraries) /opt/cfht/include/NAME/*.h (Include files for libNAME.a) /opt/cfht/bin/... (Stripped program executables)
Assuming PREFIX=/opt/cfht, so choose PREFIX accordingly. PREFIX=/usr/local will cause things to go into /usr/local/bin/, so you typically won't have to adjust your path or make symlinks. It's a matter of taste really.
If the programs compile successfully, but there were warnings, read them carefully to be sure that they are not going to cause problems later on. Warnings about SIG_IGN or SIG_DFL not being proper prototypes and warnings about format arguments to printf's can be ignored. If the warnings are due to other missing prototypes on your system, you should check the man page for a prototype and add it to ``missing_protos.h''. This file does not appear in the dependencies for any targets, so you'll have to do a ``make clean world'' to rebuild everything after editing this file. (The alternative is to add ``-Werror'' to the gcc options to prevent anything from building unless it is completely warning-free.)
Just a tip when looking around in the directories: If you find a file called `` Index'' it will typically tell you what the files and subdirectories in the current directory are for.