When IDL starts, it sets the values of a variety of system variables. System variables are a special class of predefined variables that are available to all IDL program units; they are described in detail in System Variables. The values of some system variables can be specified by the user when IDL starts, either via operating system environment variables or via preferences specified within the IDL Development Environment. In order to set these system variables, IDL does the following things when it starts up:
The process used to set environment variables varies depending on the operating system you are using.
On UNIX systems, environment variables are generally specified in a file read by your shell program at startup. Syntax for setting environment variables varies depending on the shell you are using, as does the file you use to specify the variables. If you are unsure how to set environment variables on your system, consult the system documentation or a system administrator.
For example, to set the environment variable IDL_PATH to the value
/usr/local/idl when using a C shell (
csh), you would add the following line to your
setenv IDL_PATH /usr/local/idl
Similarly, to set the same variable when using a Bourne shell (
sh), you would add the following line to your
IDL_PATH="/usr/local/idl" ; export IDL_PATH
On Microsoft Windows systems, environment variables are set in the Environment Variables dialog, which is accessible from the System Control panel. Some Windows versions allow you to set environment variables either only for the user you logged in as ("user variables") or for all users ("system variables") - setting IDL environment variables as user variables means that other users who log on to the computer will not have access to your environment variable values.
The following environment variables are checked on all platforms.
IDL uses the value of the $HOME environment variable when storing user-specific information in the local file system.
C:\Documents and Settings\username where username is the login name of the current user). If USERPROFILE is not set, IDL uses the value of the first of the following it finds: the TEMP environment variable, the TMP environment variable, the Windows system directory.
Set this environment variable to a value greater than 0 to specify the number of threads IDL should use in thread pool computations instead of defaulting to the number of CPUs present in the underlying hardware. This defines the number of threads used by IDL when thread pool usage is not otherwise specified. Setting the CPU procedure TPOOL_NTHREADS keyword, or routine-specific thread pool keywords at the time of execution overrides this environment variable setting. !CPU provides details on the state of the system processor and of IDL's use of it. Multithreading in IDL provides information on situations when limiting the number of threads used by IDL may be beneficial.
Set this environment variable equal to the name of the default IDL graphics device. Setting this value is the same as setting the value of the IDL system variable
Set this environment variable equal to the path to the main IDL directory. Setting this value is the same as setting the value of the IDL system variable
Set this environment variable equal to the path to the directory or directories containing IDL dynamically loadable modules. At startup, IDL uses the value of this environment variable, if it exists, to initialize the IDL system variable
Set this environment variable equal to the path to the directory or directories containing IDL help files. At startup, IDL uses the value of this environment variable, if it exists, to initialize the IDL system variable
Set this environment variable equal to the path to the directory or directories containing IDL library (
.sav) files. At startup, IDL uses the value of this environment variable, if it exists, to initialize the IDL system variable
<IDL_DEFAULT>in the path you specify if you want IDL's default libraries to be included in the
Create this environment variable to disable IDL's path caching mechanism. The existence of this variable is sufficient to disable path caching; the specific value of the variable is unimportant.
Set this environment variable equal to the path to an IDL batch file that contains a series of IDL statements which are executed each time IDL is run. See Startup Files for further details.
IDL, and code written in the IDL language, sometimes need to create temporary files. The location where these files should be created is highly system-dependent, and local user conventions are often different from standard practice. By default, IDL selects a reasonable location based on operating system and vendor conventions. Set the IDL_TMPDIR environment variable to override this choice and explicitly specify the location for temporary files.
The GETENV system function handles IDL_TMPDIR as a special case, and can be used by code written in IDL to obtain the temporary file location. See GETENV for more information.
The following environment variables are used by IDL for UNIX or MacOS X.
IDL uses the DISPLAY environment variable to choose which X display is used to display graphics.
As with any X Windows program, IDL uses the standard UNIX environment variable TERM to determine the type of terminal in use when IDL is in command-line mode.
IDL's FlexLM-based license manager uses the value of this environment variable to determine where to search for valid license files. Consult the license manager documentation for details.