The user interface can be customized using the following environment variables.
GDOC must point to the standard directory where documents explaining the various off-line data analysis programs are kept. The explain command will first look for the explanation file in the local directory and then in the directory specified by this variable. The name of the explanation file is constructed by appending the suffix ``.doc'' to the application name.
GERR and GOUT variables are used when the application is run using the gob command (see section 2). The standard output of the application will be redirected to the file specified by GOUT while the standard error stream will be redirected to the file specified by GERR. By default, these variables are set to /dev/null.
Some applications may load frequently used setting for some keywords. These values are loaded as constants of the interactive shell and can be stored in a configuration file. Their values can be transfered to the application keywords by referring to their value by '$' mechanism (see section 2.1). The path of the directory containing these configuration files is specified by the environment variable GCONF. The configuration filename is constructed by appending the suffix ``.config'' to the application name. If GCONF is not defined, the application looks in the directory specified by GDOC. If this variable is also not defined, or the configuration file is not found, the application will look for the configuration file in the current directory.
EDITOR environment variable is used to specify the name of the text editor to be used in the edit command (see section 2). The default editor is emacs.
The default values of keywords can be saved in ``defaults file''. GDEFAULTS variable specifies the directory where these files are stored. Such a file can be automatically loaded by the applications upon startup. The defaults file name is constructed by appending the suffix ``.def'' to the application name.
By default, the application will look for the defaults file in the current directory. If a keyword appears in the ``.def'' as well as in the ``.config'' file, the keyword will be treated as a shell constant. This can be used to effectively produce specialized versions of an application program by writing an appropriated ``.config'', where keywords can have fixed values, not alterable by the user (e.g., a version of xtract which will read input from the shared memory of the GMRT data acquisition system).
The following two variables are effective only for versions of the user interface libraries which use the GNU Readline and the History libraries.
GHIST specifies the file in which the history of the commands issued in the interactive session is saved. This file will be common to all applications. The default history file is $HOME/.g_hist.
This is also the file from which all applications will load the command history.
MAXGHIST should be set to the maximum number of command history entries which the user wishes to save. By default this is set to 100.
All applications are sensitive to the keyword help (not to be confused with the shell command help described in section 2). It is never displayed in the list of keywords. To use it, it must be specified as a command-line argument. Following is the list of values that can be set for this keyword on the command-line and their effect:
The application runs in the non-interactive mode. This is useful when the application is run from a shell script.
When run in this mode, value of all the keywords which needs to be set must be supplied on the command-line (the order of the command-line options is not important). The keywords must be fully spelled in the command-line options (i.e., no minimum-match will be applicable).
This executes the explain command of the interactive shell (see section 2) without starting the interactive shell.
If a keyword is supplied within brackets ('(' and ')') immediately after the explain string (e.g. help=explain(out), help will be provided for the specified keyword alone. If an application name is also included within the brackets, separated from the keyword by a colon (':') (e.g. help=explain(out:xtract), help for the named keyword of the named application will be provided. If the keyword is skipped (but not the colon), entire help of the named application will be provided.
This results into an empty documentation file written on the standard output, in the required format, with a list of keywords to which the application is sensitive. This is for use by authors of the applications and to encourage them to not only write the documentation, but also in a uniform format.
Application programmers can define hidden keywords which are normally not displayed for the user, but will be used by the application internally. These keywords can be accessed as normal keywords by setting help keyword to the value ``dbg''.