next up previous contents pdf.png
Next: 6.2 Tips on Minimizing Up: 6 Installation Previous: 6 Installation


6.1 Unix Shells

AE executes CIAO and HEASOFT programs using the IDL spawn command to create a Unix shell which then parses and executes CIAO/HEASOFT command lines. Five requirements govern your choice of Unix shell and the configuration of that shell:

  1. Your shell must offer the setenv command for managing unix environment variables. AE uses the setenv shell command to control PATH and other environment variables in shells it spawns.

    If you use a shell (such as bash) that does not offer setenv, there should be no need to change the default shell of your account. Instead, you should be able to alter the SHELL environment variable in whatever window will be launching IDL so that the new shells that IDL will create will be csh (or tcsh). For example, if you use the bash shell then launch IDL like this:

      export SHELL=`which csh`
      idl
    
    The csh shells spawned by IDL should inherit your unix path ($PATH) from bash. However, you will have to establish other csh configurations (described below) via the file ~/.cshrc, which csh/tcsh executes when it starts.

  2. Your Unix account must be configured such that within the spawned shells the alias ciao will configure CIAO, and the alias heasoft will configure HEASOFT and XSPEC. The CIAO and HEASOFT documentation describe how to set up those packages. For example the configuration file (~/.cshrc) for the shell tcsh that I use contains the following lines:
        alias ciao    'source /usr/astro/cxc/bin/ciao.csh -o'
        alias heasoft 'source $HEADAS/headas-init.csh'
    

    If the aliases ciao and heasoft are available in your normal interactive shells, but AE reports that those aliases are not defined, then you need to look for the reason that those alias statements in your shell configuration file would not be executed in the non-interactive shells that IDL spawns. First, confirm that IDL is spawning the shell that you expect:

        spawn, 'echo $SHELL'
    
    Second, note that shells often look for multiple configuration files at start-up, some of which are skipped for non-interactive shells. For example, a non-interactive zsh shell will execute the configuration file .zshenv but will skip .zprofile, .zlogin, and .zshrc. Finally, your shell configuration file could contain a branch (or bug) of some kind which skips the definition of the CIAO and HEASOFT aliases for non-interactive shells.

  3. MARX requires that you set the environment variable MARX_DATA_DIR to
    {marx_installation_directory}/share/marx/data/.

  4. The shells spawned by AE must not produce any output to stdout when they start up, e.g. your ~/.cshrc must not print anything. AE often spawns CIAO commands that write to stdout (e.g. pget and dmstat) and then parses the lines returned by the spawn. If the shell start-up has produced output then the text AE is looking for will appear on the wrong line. You can use the environment variable FAST_START to skip over parts of your ~/.cshrc file that produce output, as shown in the next section (§6.2).

  5. On some operating systems the standard environment variable TMPDIR is set to a unique scratch directory in every shell. Unfortunately, this causes problems for the xpa package which AE uses to control the DS9 tool that it uses in some stages. You can determine if you suffer from this problem by examining the value of TMPDIR in two shells:
      echo $TMPDIR
    
    If the value is different in the two shells, then you must set TMPDIR yourself in your shell's configuration file, e.g.:
      setenv TMPDIR /tmp/
    


next up previous contents pdf.png
Next: 6.2 Tips on Minimizing Up: 6 Installation Previous: 6 Installation
Patrick Broos
Penn State Department of Astronomy
2013-05-09