next up previous contents index
Next: Xic Search Paths Up: Xic Environment Variables Previous: Microsoft Windows   Contents   Index

Xic Environment Variables

The following environment variables are used by all XicTools programs.

CYGWIN_BIN
This variable applies only when running under Microsoft Windows, and Cygwin is installed. Cygwin is Linux-like environment and tool set which is a very useful adjunct to Windows. In particular, it provides a bash shell with standard Linux commands, and an X server, among many installable features.

XicTools programs will in some cases, such as when popping up a shell window, look for a Cygwin program. If the Cygwin program binaries (.exe files) are located in /bin or /cygwin/bin on the current disk drive, they will be found automatically. Otherwise, this variable can be set to the Windows path, including a drive letter if necessary, to the directory containing the Cygwin binaries. This is not necessarily the path one perceives from within Cygwin, since the XicTools programs do not know about the Cygwin mount points or symbolic links. The path is the one that would be seen from a DOS box, with forward or reverse slash directory separators.

XT_AUTH_MODE
By default, Unix/Linux versions of Xic and WRspice use authorization provided by an external license server, possibly hosted on a different machine. On the other hand, the Windows versions and XicII/Xiv use built-in authorization. Both the external license server and the programs not using the license server make use of a file named ``LICENSE'' provided by Whiteley Research, Inc., which provides authorization to run on the host computer.

It is possible to run Xic and WRspice without a license server, and to run XicII/Xiv from a license server. The status is set with the environment variable XT_AUTH_MODE. This variable has meaning if set to one of the keywords ``Server'' or ``Local''

If set to ``Server'', XicII and Xiv will validate through a license server the same way as Xic and WRspice normally do. If set to ``Local'', Xic and WRspice will be self-validating the way XicII normally is.

Xic and/or WRspice users on a single licensed workstation may prefer to set the environment variable in their shell startup file and not use the external license server.

When the programs look for the LICENSE file in ``Local'' mode, if the file is not found in the startup or license directories, the programs will look in the home and current directories, in that order, unless XT_LICENSE_PATH is also set.

XT_LICENSE_PATH
When using local validation (i.e., not using the license server) XT_LICENSE_PATH can be set to the full path to the license file. Only this file will be used - the regular search is suppressed.

XTLSERVER
This provides the host name of the host running the license server needed to validate the application. It is in a format understandable to the local name server. The host name can optionally be suffixed by ``:port'', where port is the port number in use by the server. There should be no space around the colon when using this form.

XT_PREFIX
All of the XicTools programs respond to the XT_PREFIX environment variable. When the tools are installed in a non-standard location, i.e., other than /usr/local, this can be set to the directory prefix which effectively replaces ``/usr/local'', and the programs will be able to access the installation library files without further directives. The Xic -R command line option can also be used for this purpose. This should not be needed under Windows, as the Registry provides the default paths.

XT_USE_GTK_THEMES
This applies to releases that statically link the GTK-1.2 libraries into the program (Linux2 and OS X distributions only). There is a potential portability issue with the GTK theme engine which is dynamically installed on some systems. Unless the engine supplied on the user's system is compatible with the libraries linked into the program, dynamic runtime linking will fail, and the program may exit. To avoid this problem, the programs use a default theme known to work (see README under default_theme in the startup directory). This can be disabled, i.e., the system themes used, by setting the environment variable XT_USE_GTK_THEMES.

XTNETDEBUG
If the variable XTNETDEBUG is defined, Xic and WRspice will echo interprocess messages sent and received to the console. In server mode, Xic will not go into the background, but will remain in the foreground, printing status messages while servicing requests.

XT_SYSTEM_MALLOC
The Unix/Linux program releases have built-in custom memory management. The built-in memory manager allows programs to use all available system memory, which is not generally true with the standard memory manager supplied with the operating system. The custom memory manager provides memory use statistics and debgging modes that are otherwise unavailable.

If the program is started with the XT_SYSTEM_MALLOC environment variable set, then the program will use the standard memory manager provided by the operating system.

The following paragraphs describe the environment variables which are relevant to Xic only.

XIC_GEOMETRY
This can be set to an X-style geometry string, to specify the default size and position of the Xic main window.

If the geometry has been specified, Xic will use it to position and size the main window (if the window manager permits this). The geometry specification, used to define window size and position, is a string in the form

widthxheight+xoff+yoff
where width, height, xoff, and yoff are numbers representing screen pixels. The ``x'' or ``X'' between the width and height is literal. A plus sign `+' or minus sign `-' must appear ahead of xoff and yoff.

+xoff
The left edge of the window is to be placed xoff pixels in from the left edge of the screen.

-xoff
The right edge of the window is to be placed xoff pixels in from the right edge of the screen.

+yoff
The top edge of the window is to be yoff pixels below the top edge of the screen.

-yoff
The bottom edge of the window is to be yoff pixels above the bottom edge of the screen.

XIC_TMP_DIR, TMPDIR
By default, Xic uses the directory /tmp for temporary files. In some installations, this directory may be too small to accommodate the large files needed by Xic, for example when producing hard copy plots. An alternative directory for temporary files can be specified with the XIC_TMP_DIR environment variable (which has precedence) or with the TMPDIR variable, which is a Unix standard. One of these should be set to a path to a directory to use for temporary files, if necessary.

XIC_LOGDIR
The variable XIC_LOGDIR can be set to a path to a directory which will be used to store certain log files produced while Xic is running. The location used for the log files is the first defined of XIC_LOGDIR, XIC_TMP_DIR, TMPDIR, or /tmp if none of these variables is defined. The log files are removed on normal exit.

XIC_MENU_RIGHT
If the variable XIC_MENU_RIGHT is defined in the environment, Xic will place the side menu to the right of the main window. The default to to place the menu at the left. This works with Unix/Linux only, the menu is always on the left under Windows.

XIC_START_DIR, HOME
Under Windows, the user's ``home'' directory is determined by looking at environment variables. The first one found to be set is assumed to contain a path to the user's home directory. First, XIC_START_DIR is checked. This is Xic (and family) specific, and would be set previously by the user. If not found, HOME is checked. This can be set by environments such as Cygwin, when starting in a Cygwin shell window, or may be set by other environments or by the user. If not found, the HOMEDIR and HOMEPATH variables, if both are found, are concatenated to yield the home directory path. In the unlikely event that these are not set, the USERPROFILE variable is checked, and if all else fails, ``C: \'' is assumed. The HOMEDIR/HOMEPATH and USERPROFILE variables are set by Windows, at least in recent Windows versions.

Under other operating systems, the home directory is well-defined and is obtained from operating system calls.

Under Windows, if Xic finds itself in the C: \ directory on startup, it will change the working directory to the home directory. This is the default when starting from the Windows Start Menu or otherwise from an icon, unless the icon property is changed.

XIC_EXIT_CMD
If the environment variable XIC_EXIT_CMD is set to a command string, that command will be executed when Xic exits. If the command string contains spaces, the command should be quoted. For example, using
setenv XIC_EXIT_CMD "/usr/games/fortune -o"
may print a rude limerick on some installations. This feature may have less frivolous uses, however.

XIC_SYM_PATH, XIC_LIB_PATH, XIC_HLP_PATH, XIC_SCR_PATH
There are four additional environment variables used to specify locations where Xic is to look for certain types of files. These variables are XIC_SYM_PATH, XIC_LIB_PATH, XIC_HLP_PATH, and XIC_SCR_PATH. These variables are described in the next section.

The internal default values for the paths assume that the installation location is the standard place under /usr/local, or if the XT_PREFIX variable is set, that value will be taken instead of ``/usr/local''.

XIC_DOCS_DIR
The environment variable XIC_DOCS_DIR can be set to an alternate location for the archive of release notes. This location is searched in the Release Notes command in the Help Menu. The default location is /usr/local/share/xictools/xic/docs, or, if XT_PREFIX is set, its value will replace /usr/local.

XICNOGDB
If Xic should crash, the normal action is to use the Unix gdb program to obtain a stack backtrace, which is emailed to Whiteley Research, along with the last few lines of the xic_run.log file, for analysis. If the variable XICNOGDB is defined, this will not happen. A similar process occurs under Windows, which can likewise be suppressed with the XICNOGDB variable.

XICNOMAIL
If the variable XICNOMAIL is set, no mail will be sent during a crash. Under Windows, the file that would have been sent is located in the current directory, and is named ``xic.stackdump''. Under Unix/Linux, a file named ``gdbout'' is produced if this variable is not set, if the gdb debugger is present on the system, and XICNOGDB is not set. If XICNOMAIL is set, and XICNOGDB is not set, then the dead Xic process will be placed under the control of the debugger.

SPICE_HOST, SPICE_EXEC_DIR, SPICE_EXEC_NAME
When connecting to SPICE in the run command, the SPICE_HOST variable is used to set the name of a remote SPICE host which provides SPICE service. The name can optionally be followed by a colon and a port number, if a non-default port is used by the SPICE server. The SPICE_EXEC_DIR environment variable provides the directory which contains the wrspice executable, which may need to be identified to Xic if it is other than /usr/local/bin. The SPICE_EXEC_NAME environment variable can be used to provide an alternate name for the wrspice executable, if it has been changed. The default is, of course, ``wrspice''. Each or these environment variables can be overridden by a corresponding internal variable, which can be set with the !set command.

IMSAVE_PATH
The printing interface includes a driver for generating image files in various formats. A few formats are handled internally, however vastly more are available through other software that may be available on the system. The driver can usually locate these programs by looking in standard places, however, if the programs exist but can't be located, this variable can be set to a colon-separated list of directories to search for the executables. This applies to Unix/Linux/OS X only. See the description of the Image print driver in 5.5.2 for more information.


next up previous contents index
Next: Xic Search Paths Up: Xic Environment Variables Previous: Microsoft Windows   Contents   Index
Stephen R. Whiteley 2012-04-01