BIRCH
Choosing default applications for viewing and displaying data



This page is obsolete as of BIRCH 3.10. It is retained for reference when upgrading from BIRCH versions 3.0 and earlier.

As of BIRCH 3.10, the BIRCH Administration Tool is used to set choices for Helper Applications.

All environment variables needed for running applications such as text editors or file viewers, grahics viewers etc.  are set in $BIRCH/admin/cshrc.source and $BIRCH/admin/profile.source.
These two files contain equivalent sets of commands which set environment variables. local.cshrc.source is read if a user's default shell is in the C-shell family (csh, tcsh) and local.profile.source is read when using a BOURNE-type shell (sh, ash, ksh, bash).

You can override these settings in two files, both found in $BIRCH/local/admin: local.cshrc.source and local.profile.source. To ensure that all users have the needed environment variables, regardless of their shell, be sure to make changes in both files. In most cases, several choices are available as comments, so all you need to do is to uncomment the appropriate line in each file.

Example 1: PDF viewer

local.cshrc.source local.profile.source
# PDF viewer
#setenv GDE_PDFVIEW acroread
#setenv GDE_PDFVIEW gv
# PDF viewer
#GDE_PDFVIEW=acroread
#GDE_PDFVIEW=gv
#export GDE_PDFVIEW

If BIRCH defaults to Adobe Acrobat (acroread) and that is not installed on your system, simply uncomment the 'gv' (ghostview) lines by removing the hash marks (#). Note that in local.profile.source, you would also need to uncomment the 'export' line so that the BOURNE shell will use the new value of for all subsequent shells, and not just the current shell.

Example 2: Web browser

In some cases, programs directly produce HTML output, and you need to be able to start a browser to read it.

local.cshrc.source (for brevity, local.profile.source not shown)
# Netscape command
#BIRCH_NETSCAPE=netscape
#BIRCH_NETSCAPE=mozilla
#BIRCH_NETSCAPE=firefox
#export BIRCH_NETSCAPE
#
# Older versions of netscape/mozilla need to be called using the
# openURL() argument, if you try to launch a new page while
# a copy of the browser is already running. The variable
# BROWSER_OPENURL

# is set to 0 by default. If you are using an older browser
# such as Netscape 7.1 and earlier, BROWSER_OPENURL should be set
# to 1.
# This variable is only used by browser.sh, which is a BOURNE shell
# script. It is not needed for csh, tcsh etc.
#BROWSER_OPENURL=1
#export BROWSER_OPENURL


Aside from there being a choice of browsers, on some systems you may need to specify a fully-qualified path to a program. For example, it might be necessary to use /usr/local/mozilla1.7.8/mozilla rather than just 'mozilla'.

Another important issue is that the browser has to be able to deal with two situations. In one case, when a program generates HTML output, a copy of the browser needs to be started. In the other case, the browser is already running, so the browser needs to open a new window containing the output. BIRCH uses the script browser.csh to manage these issues.


Please send suggestions of comments regarding this page to psgendb@cc.umanitoba.ca