update June  20, 2023
NAME

BLHelper.py - Set environment variables for BioLegato Helper Applications

SYNOPSIS
BLHelper.py --install --platform platform --birchdir directory
BLHelper.py --update --platform platform --birchdir directory
BLHelper.py --setvar variable_name=value --platform platform --birchdir directory  [--useronly]

DESCRIPTION
BioLegato uses a variety of helper applications to display output from programs. For example, if output is text, a text editor is called. If the output is PDF, a PDF viewer is called. The following environment variables can be set:

variable_name
purpose
value
example
BL_TextEditor
view text files
nedit
BL_Browser*
view web pages
firefox
BL_ImageViewer
view bitmap images eg. .gif, .jpg, .png
eog
BL_PDFViewer
view PDF files
evince
BL_PSViewer
view PostScript files
evince
BL_Document
view OpenOffice/MS-Word documents
oowriter
BL_Spreadsheet
view OpenOffice/MS-Excell spreadsheets
oocalc
BL_Terminal
terminal program for running commands
gnome-terminal -e
* Do not set BL_Browser = chooseviewer.py. Because chooseviewer.py copies a file before viewing it, content embedded in the HTML file, such as images, will not display if they are linked by relative paths.

Because the choice of programs for these tasks vary from platform to platform, and there is no way to predict which helper applications will be available, a list of possible choices is read. During an install or update, choices are read one by one until until an application is found on the system. This is the one used in setting the environment variable.

A full technical description of how BLHelper.py works can be found at
http://home.cc.umanitoba.ca/~psgendb/birchhomedir/BIRCHDEV/public_html/birchadmin/HelperAppsTechnical.html

OPTIONS

--platform platform - os/hardware platform. Legal values include linux-x86_64, linux-arm64, osx-x86_64 macos-arm64. If not given, the default is linux-x86_64.
--birchdir directory - path to the BIRCH directory.
--install - perform tasks for a new BIRCH installation. The values of BL_variables will be saved in $BIRCH/local/admin/BL.properties.<platform>.
--update - perform tasks for an update of an existing BIRCH. When updating, BLHelper.py will set variables giving priority to already-existing BL_ variable values. To retain values from earlier versions of BIRCH which use variables of the form GDE_variable, settings for GDE_ variables will be read from $BIRCH/local/admin, and the lines commented out. This step will not be done in subsequent updates, since BL_variables will now exist.
--setvar variable_name=value - set a new value for a BioLegato environment variable. This variable is set specifically for the platform specified in the $BIRCH_PLATFORM environment variable. If you have a multi-platform implementation of BIRCH, BLHelper.py must be run on each platform for which you wish to set these variables.
--useronly - If useronly is set, BLHelper.py only writes settings that affect the user's account, whereas without useronly, changes affect all users of the BIRCH system. useronly settings are written to $HOME/.config/BIRCH/BLHelper.source.



AUTHOR
Dr. Brian Fristensky
Department of Plant Science
University of Manitoba
Winnipeg, MB  Canada R3T 2N2
frist@cc.umanitoba.ca
http://home.cc.umanitoba.ca/~frist5