#!/bin/bash ## Here are some configuration options for Linux Client Users. ## - Avoids using any FMOD STUDIO audio driver. #export LL_BAD_FMODSTUDIO_DRIVER=x ## - Avoids using any OpenAL audio driver. #export LL_BAD_OPENAL_DRIVER=x ## - Avoids using the FMOD Studio PulseAudio audio driver. #export LL_BAD_FMOD_PULSEAUDIO=x ## - Avoids using the FMOD Studio ALSA audio driver. #export LL_BAD_FMOD_ALSA=x ## Everything below this line is just for advanced troubleshooters. ##------------------------------------------------------------------- ## - For advanced debugging cases, you can run the viewer under the ## control of another program, such as strace, gdb, or valgrind. If ## you're building your own viewer, bear in mind that the executable ## in the bin directory will be stripped: you should replace it with ## an unstripped binary before you run. #export LL_WRAPPER='gdb --args' #export LL_WRAPPER='valgrind --smc-check=all --error-limit=no --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp' ## Nothing worth editing below this line. ##------------------------------------------------------------------- SCRIPTSRC=`readlink -f "$0" || echo "$0"` RUN_PATH=`dirname "${SCRIPTSRC}" || echo .` echo "Running from ${RUN_PATH}" cd "${RUN_PATH}" # Re-register the secondlife:// protocol handler every launch, for now. ./etc/register_secondlifeprotocol.sh # Re-register the application with the desktop system every launch, for now. ./etc/refresh_desktop_app_entry.sh ## Before we mess with LD_LIBRARY_PATH, save the old one to restore for ## subprocesses that care. export SAVED_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" # Add our library directory export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}" # Copy "$@" to ARGS array specifically to delete the --skip-gridargs switch. # The gridargs.dat file is no more, but we still want to avoid breaking # scripts that invoke this one with --skip-gridargs. ARGS=() for ARG in "$@"; do if [ "--skip-gridargs" != "$ARG" ]; then ARGS[${#ARGS[*]}]="$ARG" fi done # Run the program. # Don't quote $LL_WRAPPER because, if empty, it should simply vanish from the # command line. But DO quote "${ARGS[@]}": preserve separate args as # individually quoted. $LL_WRAPPER bin/do-not-directly-run-secondlife-bin "${ARGS[@]}" LL_RUN_ERR=$? # Handle any resulting errors if [ $LL_RUN_ERR -ne 0 ]; then # generic error running the binary echo '*** Bad shutdown ($LL_RUN_ERR). ***' if [ "$(uname -m)" = "x86_64" ]; then echo cat << EOFMARKER You are running the Second Life Viewer on a x86_64 platform. The most common problems when launching the Viewer (particularly 'bin/do-not-directly-run-secondlife-bin: not found' and 'error while loading shared libraries') may be solved by installing your Linux distribution's 32-bit compatibility packages. For example, on Ubuntu and other Debian-based Linuxes you might run: $ sudo apt-get install ia32-libs ia32-libs-gtk ia32-libs-kde ia32-libs-sdl EOFMARKER fi fi echo echo '*******************************************************' echo 'This is a BETA release of the Second Life linux client.' echo 'Thank you for testing!' echo 'Please see README-linux.txt before reporting problems.' echo