debian:~# ut204 bash: ut204: command not found debian:~# ut2004 Could not load OpenGL library History: Exiting due to error
debian:~# su norris norris@debian:/root$ whoami norris norris@debian:/root$ ut2004 Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Couldn't initialize SDL: No available video device History: Exiting due to error
norris@debian:~$ ut2004 Could not load OpenGL library History: Exiting due to error
#!/bin/sh
#
# ut2004 startup script
#
# Function to find the real directory a program resides in.
# Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software
FindPath()
{
fullpath="`echo $1 | grep /`"
if [ "$fullpath" = "" ]; then
oIFS="$IFS"
IFS=:
for path in $PATH
do if [ -x "$path/$1" ]; then
if [ "$path" = "" ]; then
path="."
fi
fullpath="$path/$1"
break
fi
done
IFS="$oIFS"
fi
if [ "$fullpath" = "" ]; then
fullpath="$1"
fi
# Is the sed/ls magic portable?
if [ -L "$fullpath" ]; then
#fullpath="`ls -l "$fullpath" | awk '{print $11}'`"
fullpath=`ls -l "$fullpath" |sed -e 's/.* -> //' |sed -e 's/\*//'`
fi
dirname $fullpath
}
# Set the home if not already set.
if [ "${UT2004_DATA_PATH}" = "" ]; then
UT2004_DATA_PATH="`FindPath $0`/System"
fi
LD_LIBRARY_PATH=.:${UT2004_DATA_PATH}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
# Let's boogie!
if [ -x "${UT2004_DATA_PATH}/ut2004-bin" ]
then
cd "${UT2004_DATA_PATH}/"
exec "./ut2004-bin" $*
fi
echo "Couldn't run UT2004 (ut2004-bin). Is UT2004_DATA_PATH set?"
exit 1
# end of ut2004 ...
