Setting Up The Gsharp Environment

On UNIX, Gsharp uses a number of environment variables. You can set up these by hand in your .login script or you can use one of the set-up scripts supplied.

The Environment Variables

The following environment variables need to be set-up:

  • UNIDIR - needs to point to the root of the Gsharp installation.
  • path - $UNIDIR/bin needs to be added to the path
  • LD_LIBRARY_PATH - $UNIDIR/lib needs to be added to the list of dynamic libraries. (HP-UX uses SHLIB_PATH instead).
  • XFILESEARCHPATH - needs to include $UNIDIR/bitmaps and $UNIDIR/msg/C
  • NLSPATH - set to the message catalogue in $UNIDIR/msg/C
  • LM_LICENSE_FILE - must include the FLEXlm license file to run Gsharp.

C shell (csh)

If you are using a C-shell then you need to source the uni.login in the Gsharp base directory e.g.

source /usr/uniras/7v2/base/uni.login

Bourne shell (sh)

If you are using a bourne shell or a k-shell then you must execute the uni.profile in the Gsharp base directory e.g.

. /usr/uniras/7v2/base/uni.profile

When to execute the script

The set-up script needs to be executed once before Gsharp is used.

You can either

  • Execute the script in your .login script - recommended if you know you will use Gsharp nearly all of the time and know it use of environment variables does not conflict with any other program.
  • Execute it by hand whenever you need it - recommended only to quickly test an installation
  • Set-up an alias in your login script to run the set-up script - recommended if you have two installations you want to switch between e.g.
    alias 7v1 'source /usr/uniras/7v1/base/uni.login'
    alias 7v2 'source /usr/uniras/7v2/base/uni.login'
  • Create a script in /usr/local/bin to run the set-up script and then execute Gsharp e.g.
    #!/bin/sh
    . /usr/uniras/7v2/base/uni.profile
    Gsharp $*

    The uni.profile includes a check to prevent this sort of use. You can just comment out this check.