Defining Environment Variables [PREVIOUS] [TOP] [NEXT]

4.2 Defining Environment Variables

Once the CD or tape has been read and the files created on disk, the environment variables needed for VICAR to run must be set up. Two shell scripts are provided with the VICAR system to accomplish this task for you. Both reside in the root of the VICAR directory tree ($V2TOP), and are called vicset1.csh and vicset2.csh.

The root directory is specified via the environment variable $V2TOP. All VICAR file and directory references key off of this environment variable, so the tree may be moved as needed. The shell scripts vicset1.csh and vicset2.csh set up all other environment variables based on $V2TOP. Note that $V2TOP should point to the vicar subdirectory of the directory you created in "Loading VICAR."

Since these scripts define environment variables, they must be executed via the "source" command so that the environment will actually change. The $V2TOP environment variable should be set up first; if it is not, then vicset1.csh will prompt for the name of the VICAR root directory. Important Note: Due to limitations in TAE, the directory you choose for VICAR must not have any uppercase letters in the pathname. In other words, /CDROM will not work with TAE, though it will work with SAGE.

In order to allow changes in the location of VICAR, you may wish to put a source-able script in /usr/local/bin that sets $V2TOP then source's vicset1.csh and vicset2.csh. That way, the user does not hard-code the VICAR directory location into his/her own .cshrc file. For example, the script might look like:

# Set up VICAR
% setenv V2TOP /wherever/vicar
% source $V2TOP/vicset1.csh
% source $V2TOP/vicset2.csh
% set path=($path $TAEBIN/{all,$TAEPLAT})

Users who want to make use of VICAR consistently should source vicset1.csh and vicset2.csh (or the script in /usr/local/bin) in their .cshrc file, so it is always available.

vicset1.csh defines only environment variables, while vicset2.csh sets up TAE and defines some aliases. They do not really need to be split into two files, but are kept that way for compatibility with the VMS version of VICAR.

There are some environment variables in vicset1.csh that might need to be modified for your site. Some Sun systems put the /tmp directory in the swap partition in order to save disk space. A bug exists in some versions of SunOS (4.1.x at least) that causes the lockf() system call to fail if the file is in such a directory. If this is the case on your system, then read the comments for the VRDITMP environment variable in vicset1.csh, uncomment it, and set it appropriately.

Some external software such as SPICE and PDS_LABEL_LIB reside outside the VICAR tree. Some environment variables in vicset1.csh point to this software and may need to be changed for your system. Also, the X-Windows library locations may need to be modified. These would affect imake templates $V2UTIL/imake_unix.tmpl and $V2UTIL/vicsys.tmpl.

Modifying TAE's slogon.pdf

The startup file slogon.pdf, in the directory $V2TOP/tae52/pdf is run every time a user starts up TAE, i.e. types VICAR. It's not run when starting SAGE. The commands in slogon.pdf are in the TAE Command Language (TCL). You can get help on TCL by typing HELP at the VICAR prompt.

You may want to modify slogon.pdf to change VICAR's behavior. As an example, you may want to run most of VICAR from a CD, but substitute a few more recent executables from hard disk. In this case you want VICAR to look for a PDF first on hard disk, then on the CD. To do this:

  1. Copy the vicset1.csh from the CD to a convenient hard disk directory:
    % cp $V2TOP/vicset1.csh /usr/local/vicar
  2. Create an environment variable in $V2TOP/vicset1.csh that points to the directory on hard disk where you're keeping your revised PDFs/executables:
    % setenv VREVISE /usr/local/vicar/revised
  3. Edit the setlib command in slogon.pdf so your on-disk directory comes first:
  4. Edit the system login script so that the modified /usr/local/vicar/vicset1.csh script is used when starting VICAR.

Next: Notes on using Solaris 2.5
Previous: Interactions with Login (.cshrc) Scripts
Top: VICAR Installation Table of Contents
Updated Thu May 8 13:33:31 1997 by Larry Bolef