#!/bin/sh
#
# This script is to allow X applications that rely upon X default resources to
# be launched from the Sun Java 1.4 JVM. Apparently Sun thought it was
# necessary to set the XFILESEARCH environment variable to a Solaris specific
# location causing X applications to fail on a Red Hat system.
#
# This script also sets the DISPLAY to localhost if it has not been set yet.
#
# Changelog:
#
#   07/26/2002  Stapels     Initial Release.
#   09/06/2002  Stapels     (01) Added export to DISPLAY variable.
#

prog=`basename $0`

if [ $# -eq 0 ]; then
    cat <<EOM
Usage: $prog xapp [parms]
EOM
    exit 1;
fi

unset XFILESEARCHPATH

if [ -z "$DISPLAY" ]; then
    export DISPLAY="localhost:0" # 01
fi

actzTrace "XLCHSCRF: $prog: DISPLAY=$DISPLAY"
#actzTrace "XLCHSCRF: $prog: Launching $@"

$@
