diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-09-01 18:35:23 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-09-04 21:58:53 +0800 |
| commit | 00bb3bb6f07660bd914d29a1389342bb3060d254 (patch) | |
| tree | 431f574922494d2201718f13085f17bc6bd7fb42 /indra/newview/linux_tools | |
| parent | a8636720129952c10cf49ab80da21bf8b340b96c (diff) | |
| parent | 4ef9f8f14b35ed388c294d53767a0dca0e890924 (diff) | |
Merge remote-tracking branch 'secondlife/release/26.4' into 26.4
Diffstat (limited to 'indra/newview/linux_tools')
| -rw-r--r-- | indra/newview/linux_tools/client-readme-joystick.txt | 78 | ||||
| -rw-r--r-- | indra/newview/linux_tools/client-readme-voice.txt | 81 | ||||
| -rw-r--r-- | indra/newview/linux_tools/client-readme.txt | 244 | ||||
| -rwxr-xr-x | indra/newview/linux_tools/launch_url.sh | 86 | ||||
| -rwxr-xr-x | indra/newview/linux_tools/refresh_desktop_app_entry.sh | 15 | ||||
| -rwxr-xr-x | indra/newview/linux_tools/register_secondlifeprotocol.sh | 75 | ||||
| -rwxr-xr-x | indra/newview/linux_tools/wrapper.sh | 49 |
7 files changed, 60 insertions, 568 deletions
diff --git a/indra/newview/linux_tools/client-readme-joystick.txt b/indra/newview/linux_tools/client-readme-joystick.txt deleted file mode 100644 index 4f89a73ccb..0000000000 --- a/indra/newview/linux_tools/client-readme-joystick.txt +++ /dev/null @@ -1,78 +0,0 @@ -Second Life - Joystick & SpaceNavigator Support README --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -WHAT IS IT? --=-=-=-=-=- - -This feature allows the use of a joystick or other supported multi-axis -device for controlling your avatar and camera. - -REQUIREMENTS --=-=-=-=-=-= - -* A joystick or other generic multi-axis input device supported by your chosen - version of Linux - -- OR - - -* A SpaceNavigator device (additional configuration may be required, see below) - -Success has been reported on the following systems so far: -* Ubuntu 7.04 (Feisty) with a generic USB joystick -* Ubuntu 7.04 (Feisty) with a USB 3DConnexion SpaceNavigator -* Ubuntu 6.06 (Dapper) with a generic USB joystick -* Ubuntu 6.06 (Dapper) with a USB 3DConnexion SpaceNavigator - -CONFIGURATION --=-=-=-=-=-=- - -SPACE NAVIGATOR: *Important* - do not install the Linux SpaceNavigator -drivers from the disk included with the device - these are problematic. -Some distributions of Linux (such as Ubuntu, Gentoo and Mandriva) will -need some system configuration to make the SpaceNavigator usable by -applications such as the Second Life Viewer, as follows: - -* Mandriva Linux Configuration: - You need to add two new files to your system. This only needs to be - done once. These files are available at the 'SpaceNavigator support with - udev and Linux input framework' section of - <http://www.aaue.dk/~janoc/index.php?n=Personal.Downloads> - -* Ubuntu or Gentoo Linux Configuration: - For a quick start, you can simply paste the following line into a terminal - before plugging in your SpaceNavigator - this only needs to be done once: - sudo bash -c 'echo KERNEL==\"event[0-9]*\", SYSFS{idVendor}==\"046d\", SYSFS{idProduct}==\"c626\", SYMLINK+=\"input/spacenavigator\", GROUP=\"plugdev\", MODE=\"664\" > /etc/udev/rules.d/91-spacenavigator-LL.rules ; echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><deviceinfo version=\"0.2\"><device><match key=\"info.product\" contains=\"3Dconnexion SpaceNavigator\"><merge key=\"input.x11_driver\" type=\"string\"></merge></match></device></deviceinfo>" > /etc/hal/fdi/policy/3Dconnexion_SpaceNavigator_LL.fdi' - -For more comprehensive Linux SpaceNavigator configuration information please -see the section 'Installing SpaceNavigator without the official driver' here: -<http://www.aaue.dk/~janoc/index.php?n=Personal.3DConnexionSpaceNavigatorSupport> - -JOYSTICKS: These should be automatically detected and configured on all -modern distributions of Linux. - -ALL: Your joystick or SpaceNavigator should be plugged-in before you start the -Second Life Viewer, so that it may be detected. If you have multiple input -devices attached, only the first detected SpaceNavigator or joystick device -will be available. - -Once your system recognises your joystick or SpaceNavigator correctly, you -can go into the Second Life Viewer's Preferences dialog, click the 'Input & -Camera' tab, and click the 'Joystick Setup' button. From here you may enable -and disable joystick support and change some configuration settings such as -sensitivity. SpaceNavigator users are recommended to click the -'SpaceNavigator Defaults' button. - -KNOWN PROBLEMS --=-=-=-=-=-=-= - -* If your chosen version of Linux treats your joystick/SpaceNavigator as -if it were a mouse when you plug it in (i.e. it is automatically used to control -your desktop cursor), then the SL Viewer may detect this device *but* will be -unable to use it properly. - -FURTHER PROBLEMS? --=-=-=-=-=-=-=-=- - -Please report further issues to the public Second Life issue-tracker -at <http://jira.secondlife.com/> (please note, however, that this is not -a support forum). diff --git a/indra/newview/linux_tools/client-readme-voice.txt b/indra/newview/linux_tools/client-readme-voice.txt deleted file mode 100644 index bfefdf3471..0000000000 --- a/indra/newview/linux_tools/client-readme-voice.txt +++ /dev/null @@ -1,81 +0,0 @@ -Second Life - Linux Voice Support README --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -WHAT IS IT? --=-=-=-=-=- - -Linux Voice Support is a feature in testing which allows users of the Linux -Second Life client to participate in voice-chat with other residents and -groups inside Second Life, with an appropriate headset/microphone. - -REQUIREMENTS --=-=-=-=-=-= - -* A headset/microphone supported by your chosen version of Linux -* At this time, the PulseAudio audio system is recommended; this software - is already part of most modern (2009+) Linux desktop systems. Alternatively, - the ALSA audio system may be used on systems installed from around - 2007 onwards (again this is likely already installed on your system). - -TESTING YOUR SETTINGS --=-=-=-=-=-=-=-=-=-=- - -* The Second Life region 'Voice Echo Canyon' is a great place for testing -your hardware settings and quality - it will 'echo' your voice back to you -when you speak. - -KNOWN PROBLEMS --=-=-=-=-=-=-= - -* Compatibility with old ALSA-based audio systems (such as Ubuntu Dapper - from 2006) is poor. - -TROUBLESHOOTING --=-=-=-=-=-=-=- - -PROBLEM 1: I don't see a white dot over the head of my avatar or other - Voice-using avatars. -SOLUTION: -a. Ensure that 'Enable voice' is enabled in the 'Sound' section of the - Preferences window, and that you are in a voice-enabled area. -b. If the above does not help, exit Second Life and ensure that any - remaining 'SLVoice' processes (as reported by 'ps', 'top' or similar) - are killed before restarting. - -PROBLEM 2: I have a white dot over my head but I never see (or hear!) anyone - except myself listed in the Active Speakers dialog when I'm sure that other - residents nearby are active Voice users. -SOLUTION: This is an incompatibility between the Voice support and your - system's audio (ALSA) driver version/configuration. -a. Back-up and remove your ~/.asoundrc file, re-test. -b. Check for updates to your kernel, kernel modules and ALSA-related - packages using your Linux distribution's package-manager - install these, - reboot and re-test. -c. Update to the latest version of ALSA manually. For a guide, see the - 'Update to the Latest Version of ALSA' section of this page: - <https://help.ubuntu.com/community/HdaIntelSoundHowto> or the official - documentation on the ALSA site: <http://www.alsa-project.org/> - reboot - and re-test. - -PROBLEM 3: I can hear other people, but they cannot hear me. -SOLUTION: -a. Ensure that you have the 'Speak' button (at the bottom of the Second Life - window) activated while you are trying to speak. -b. Ensure that your microphone jack is inserted into the correct socket of your - sound card, where appropriate. -c. Use your system mixer-setting program (such as the PulseAudio 'volume - control' applet or the ALSA 'alsamixer' program) to ensure that microphone - input is set as the active input source and is not muted. -d. Verify that audio input works in other applications, i.e. Audacity - -PROBLEM 4: Other people just hear bursts of loud noise when I speak. -SOLUTION: -a. Use your system mixer-setting program or the 'alsamixer' program to ensure - that microphone Gain/Boost is not set too high. - -FURTHER PROBLEMS? --=-=-=-=-=-=-=-=- - -Please report further issues to the public Second Life issue-tracker -at <http://jira.secondlife.com/> (please note, however, that this is not -a support forum). diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt deleted file mode 100644 index cb8d1af535..0000000000 --- a/indra/newview/linux_tools/client-readme.txt +++ /dev/null @@ -1,244 +0,0 @@ -Second Life - Linux Beta README --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -This document contains information about the Second Life Linux -client, and isn't meant to serve as an introduction to Second -Life itself - please see <http://www.secondlife.com/whatis/>. - -1. Introduction -2. System Requirements -3. Installing & Running -4. Known Issues -5. Troubleshooting - 5.1. 'Error creating window.' - 5.2. System hangs - 5.3. Blank window after minimizing it - 5.4. Audio - 5.5. 'Alt' key for camera controls doesn't work - 5.6. In-world streaming movie, music and Flash playback -6. Advanced Troubleshooting - 6.1. Audio - 6.2. OpenGL -7. Obtaining and working with the client source code -8. Getting more help, and reporting problems - - -1. INTRODUCTION --=-=-=-=-=-=-=- - -Hi! This is a BETA release of the Second Life client for Linux. -The 'beta' status means that although we're still smoothing-out a few rough -edges, this version of the client is functionally complete and should -work quite well 'out of the box' for accessing Second Life. - -We encourage you to try it out and let us know of its compatibility -with your system. Be aware that although this is a 'beta' client, it connects -to the main Second Life world and changes you make there are permanent. - -You will have either obtained this client from secondlife.com (the official -site) or from a third-party packager; if you encounter any problems then -we recommend trying the latest official builds from secondlife.com which are -updated often. - -Please enjoy! - - -2. SYSTEM REQUIREMENTS --=-=-=-=-=-=-=-=-=-=-= - -Minimum requirements: - * Internet Connection: Cable or DSL - * Computer Processor: 800MHz Pentium III or Athlon or better - (recommended: 1.5GHz or more) - * Computer Memory: 512MB (recommended: 768MB or more) - * Linux Operating System: A reasonably modern 32-bit Linux environment - is required. If you are running a 64-bit Linux distribution then - you will need its 32-bit compatibility environment installed, but - this configuration is not currently supported. - * PulseAudio or ALSA Linux system sound software. A recent PulseAudio - is the recommended configuration; see README-linux-voice.txt for more - information. - * Video/Graphics Card: - o nVidia GeForce 2, GeForce 4mx, or better (recommend one of the - following: 6700, 6800, 7600, 7800, 7900, 8400, 8500, 8600, - 8800, Go 7400, Go 7600, Go 7800, Go 7900, +) - o OR ATI Radeon 8500, 9250, or better - (nVidia cards are recommended for the Linux client) - - **NOTE**: Second Life absolutely requires you to have recent, correctly- - configured OpenGL 3D drivers for your hardware - the graphics drivers - that came with your operating system may not be good enough! See the - TROUBLESHOOTING section if you encounter problems starting Second Life. - -For a more comfortable experience, the RECOMMENDED hardware for the Second -Life Linux client is very similar to that for Windows, as detailed at: -<https://secondlife.com/corporate/sysreqs.php> - - -3. INSTALLING & RUNNING --=-=-=-=-=-=-=-=-=-=-=- - -The Second Life Linux client can entirely run from the directory you have -unpacked it into - no installation step is required. If you wish to -perform a separate installation step anyway, you may run './install.sh' - -Run ./secondlife from the installation directory to start Second Life. - -For in-world MOVIE and MUSIC PLAYBACK, you will need (32-bit) GStreamer 0.10 -installed on your system. This is optional - it is not required for general -client functionality. If you have GStreamer 0.10 installed, the selection of -in-world movies you can successfully play will depend on the GStreamer -plugins you have; if you cannot play a certain in-world movie then you are -probably missing the appropriate GStreamer plugin on your system - you may -be able to install it (see TROUBLESHOOTING). - -User data is stored in the hidden directory ~/.secondlife by default; you may -override this location with the SECONDLIFE_USER_DIR environment variable if -you wish. - - -4. KNOWN ISSUES --=-=-=-=-=-=-=- - -* No significant known issues at this time. - - -5. TROUBLESHOOTING --=-=-=-=-=-=-=-=-= - -The client prints a lot of diagnostic information to the console it was -run from. Most of this is also replicated in ~/.secondlife/logs/SecondLife.log -- this is helpful to read when troubleshooting, especially 'WARNING' and -'ERROR' lines. - -VOICE PROBLEMS? See the separate README-linux-voice.txt file for Voice - troubleshooting information. - -SPACENAVIGATOR OR JOYSTICK PROBLEMS? See the separate - README-linux-joystick.txt file for configuration information. - -PROBLEM 1:- Second Life fails to start up, with a warning on the console like: - 'Error creating window.' or - 'Unable to create window, be sure screen is set at 32-bit color' or - 'SDL: Couldn't find matching GLX visual.' -SOLUTION:- Usually this indicates that your graphics card does not meet - the minimum requirements, or that your system's OpenGL 3D graphics driver is - not updated and configured correctly. If you believe that your graphics - card DOES meet the minimum requirements then you likely need to install the - official so-called 'non-free' nVidia or ATI (fglrx) graphics drivers; we - suggest one of the following options: - * Consult your Linux distribution's documentation for installing these - official drivers. For example, Ubuntu provides documentation here: - <https://help.ubuntu.com/community/BinaryDriverHowto> - * If your distribution does not make it easy, then you can download the - required Linux drivers straight from your graphics card manufacturer: - - nVidia cards: <http://www.nvidia.com/object/unix.html> - - ATI cards: <http://ati.amd.com/support/driver.html> - -PROBLEM 2:- My whole system seems to hang when running Second Life. -SOLUTION:- This is typically a hardware/driver issue. The first thing to - do is to check that you have the most recent official drivers for your - graphics card (see PROBLEM 1). -SOLUTION:- Some residents with ATI cards have reported that running - 'sudo aticonfig --locked-userpages=off' before running Second Life solves - their stability issues. -SOLUTION:- As a last resort, you can disable most of Second Life's advanced - graphics features by editing the 'secondlife' script and removing the '#' - from the line which reads '#export LL_GL_NOEXT=x' - -PROBLEM 3:- After I minimize the Second Life window, it's just blank when - it comes back. -SOLUTION:- Some Linux desktop 'Visual Effects' features are incompatible - with Second Life. One reported solution is to use your desktop - configuration program to disable such effects. For example, on Ubuntu 7.10, - use the desktop toolbar menu to select System -> Preferences -> Appearance, - then change 'Visual Effects' to 'None'. - -PROBLEM 4:- Music and sound effects are silent or very stuttery. -SOLUTION:- The most common solution is to ensure that you have the 'esd' - program (part of the 'esound' package) installed and running before you - start Second Life. Users of Ubuntu (and some other) Linux systems can - simply run the following to install and configure 'esound': - sudo apt-get install esound - For others, simply running 'esd&' from a command-line should get it running. - -PROBLEM 5:- Using the 'Alt' key to control the camera doesn't work or just - moves the Second Life window. -SOLUTION:- Some window managers eat the Alt key for their own purposes; you - can configure your window manager to use a different key instead (for - example, the 'Windows' key!) which will allow the Alt key to function - properly with mouse actions in Second Life and other applications. - -PROBLEM 6:- In-world movie, music, or Flash playback doesn't work for me. -SOLUTION:- You need to have a working installation of GStreamer 0.10; this - is usually an optional package for most versions of Linux. If you have - installed GStreamer 0.10 and you can play some music/movies but not others - then you need to install a wider selection of GStreamer plugins, either - from your vendor (i.e. the 'Ugly' plugins) or an appropriate third party. - For Flash playback, you need to have Flash 10 installed for your normal - web browser (for example, Firefox). PulseAudio is required for Flash - volume control / muting to fully function inside Second Life. - - -6. ADVANCED TROUBLESHOOTING --=-=-=-=-=-=-=-=-=-=-=-=-=- - -The 'secondlife' script which launches Second Life contains some -configuration options for advanced troubleshooters. - -* AUDIO - Edit the 'secondlife' script and you will see these audio - options: LL_BAD_OPENAL_DRIVER, LL_BAD_FMODSTUDIO_DRIVER. - Second Life tries to use OpenAL, FMODSTUDIO (PULSEAUDIO, ALSA) - audio drivers in this order; you may uncomment the corresponding LL_BAD_* - option to skip an audio driver which you believe may be causing you trouble. - -* OPENGL - For advanced troubleshooters, the LL_GL_BLACKLIST option lets - you disable specific GL extensions, each of which is represented by a - letter ("a"-"o"). If you can narrow down a stability problem on your system - to just one or two GL extensions then please post details of your hardware - (and drivers) to the Linux Client Testers forum (see link below) along - with the minimal LL_GL_BLACKLIST which solves your problems. This will help - us to improve stability for your hardware while minimally impacting - performance. - LL_GL_BASICEXT and LL_GL_NOEXT should be commented-out for this to be useful. - - -7. OBTAINING AND WORKING WITH THE CLIENT SOURCE CODE --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -We're pleased to have released the Second Life client's source code under -an Open Source license compatible with the 'GPL'. To get involved with client -development, please see: -<http://wiki.secondlife.com/wiki/Open_Source_Portal> - - -8. GETTING MORE HELP AND REPORTING PROBLEMS --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -For general help and support with Second Life: -<http://secondlife.com/community/support.php> - -For problems and discussion concerning unofficial (not secondlife.com) -releases, please contact your packager or the SLDev mailing list: -<https://lists.secondlife.com/cgi-bin/mailman/listinfo/sldev> - -In-world help: Please use the 'Help' menu in the client for various -non-Linux-specific Second Life help options. - -In-world discussion: There is a 'Linux Client Users' group -inside Second Life which is free to join. You can find it by pressing -the 'Search' button at the bottom of the window and then selecting the -'Groups' tab and searching for 'Linux'. This group is useful for discussing -Linux issues with fellow Linux client users who are online. - -The Second Life Issue Tracker: -<http://jira.secondlife.com/> -This is the right place for finding known issues and reporting new -bugs in all Second Life releases if you find that the Troubleshooting -section in this file hasn't helped (please note, however, that this is -not a support forum). - -Linux Client Testers forum: -<http://forums.secondlife.com/forumdisplay.php?forumid=263> -This is a forum where Linux Client users can help each other out and -discuss the latest updates. diff --git a/indra/newview/linux_tools/launch_url.sh b/indra/newview/linux_tools/launch_url.sh deleted file mode 100755 index 404ea36f26..0000000000 --- a/indra/newview/linux_tools/launch_url.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -# This script loads a web page in the 'default' graphical web browser. -# It MUST return immediately (or soon), so the browser should be -# launched in the background (thus no text-only browsers). -# This script does not trust the URL to be well-escaped or shell-safe. -# -# On Unixoids we try, in order of decreasing priority: -# - $BROWSER if set (preferred) -# - Default GNOME browser -# - Default KDE browser -# - x-www-browser -# - The first browser in $BROWSER_COMMANDS that is found. - -URL="$1" - -if [ -z "$URL" ]; then - echo "Usage: $(basename "$0") URL" - exit -fi - -# restore LD_LIBRARY_PATH from SAVED_LD_LIBRARY_PATH if it exists -if [ "${SAVED_LD_LIBRARY_PATH+isset}" = "isset" ]; then - export LD_LIBRARY_PATH="${SAVED_LD_LIBRARY_PATH}" - echo "$0: Restored library path to '${SAVED_LD_LIBRARY_PATH}'" -fi - -# if $BROWSER is defined, use it. -XBROWSER=`echo "$BROWSER" |cut -f1 -d:` -if [ ! -z "$XBROWSER" ]; then - XBROWSER_CMD=`echo "$XBROWSER" |cut -f1 -d' '` - # look for $XBROWSER_CMD either literally or in PATH - if [ -x "$XBROWSER_CMD" ] || which $XBROWSER_CMD >/dev/null; then - # check for %s string, avoiding bash2-ism of [[ ]] - if echo "$XBROWSER" | grep %s >/dev/null; then - # $XBROWSER has %s which needs substituting - echo "$URL" | xargs -r -i%s $XBROWSER & - exit - fi - # $XBROWSER has no %s, tack URL on the end instead - $XBROWSER "$URL" & - exit - fi - echo "$0: Couldn't find the browser specified by \$BROWSER ($BROWSER)" - echo "$0: Trying some others..." -fi - -# Launcher the default GNOME browser. -if [ ! -z "$GNOME_DESKTOP_SESSION_ID" ] && which gnome-open >/dev/null; then - gnome-open "$URL" & - exit -fi - -# Launch the default KDE browser. -if [ ! -z "$KDE_FULL_SESSION" ] && which kfmclient >/dev/null; then - kfmclient openURL "$URL" & - exit -fi - -# List of browser commands that will be tried in the order listed. x-www-browser -# will be tried first, which is a debian alternative. -BROWSER_COMMANDS=" \ - x-www-browser \ - firefox \ - mozilla-firefox \ - iceweasel \ - iceape \ - opera \ - epiphany-browser \ - epiphany-gecko \ - epiphany-webkit \ - epiphany \ - mozilla \ - seamonkey \ - galeon \ - dillo \ - netscape" -for browser_cmd in $BROWSER_COMMANDS; do - if which $browser_cmd >/dev/null; then - $browser_cmd "$URL" & - exit - fi -done - -echo '$0: Failed to find a known browser. Please consider setting the $BROWSER environment variable.' -exit 1 diff --git a/indra/newview/linux_tools/refresh_desktop_app_entry.sh b/indra/newview/linux_tools/refresh_desktop_app_entry.sh index d2b2a732d5..84af7505ea 100755 --- a/indra/newview/linux_tools/refresh_desktop_app_entry.sh +++ b/indra/newview/linux_tools/refresh_desktop_app_entry.sh @@ -3,7 +3,7 @@ SCRIPTSRC=`readlink -f "$0" || echo "$0"` RUN_PATH=`dirname "${SCRIPTSRC}" || echo .` -install_prefix=${RUN_PATH}/.. +install_prefix="$(realpath -- "${RUN_PATH}/..")" function install_desktop_entry() { @@ -13,18 +13,25 @@ function install_desktop_entry() local desktop_entry="\ [Desktop Entry]\n\ Name=Second Life\n\ +GenericName=Second Life Viewer\n\ Comment=Client for the On-line Virtual World, Second Life\n\ +Path=${installation_prefix}\n\ Exec=${installation_prefix}/secondlife\n\ Icon=${installation_prefix}/secondlife_icon.png\n\ Terminal=false\n\ Type=Application\n\ -Categories=Application;Network;\n\ +Categories=Game;Simulation;\n\ StartupNotify=true\n\ +StartupWMClass="com.secondlife.indra.viewer"\n\ X-Desktop-File-Install-Version=3.0" echo " - Installing menu entries in ${desktop_entries_dir}" - mkdir -vp "${desktop_entries_dir}" - echo -e $desktop_entry > "${desktop_entries_dir}/secondlife-viewer.desktop" || "Failed to install application menu!" + WORK_DIR=`mktemp -d` + echo -e $desktop_entry > "${WORK_DIR}/secondlife-viewer.desktop" || "Failed to install application menu!" + desktop-file-install --dir="${desktop_entries_dir}" ${WORK_DIR}/secondlife-viewer.desktop + rm -r $WORK_DIR + + update-desktop-database "${desktop_entries_dir}" } if [ "$UID" == "0" ]; then diff --git a/indra/newview/linux_tools/register_secondlifeprotocol.sh b/indra/newview/linux_tools/register_secondlifeprotocol.sh index 33c34d7a76..d41e6dd6cb 100755 --- a/indra/newview/linux_tools/register_secondlifeprotocol.sh +++ b/indra/newview/linux_tools/register_secondlifeprotocol.sh @@ -6,43 +6,52 @@ HANDLER="$1" -RUN_PATH=`dirname "$0" || echo .` +SCRIPTSRC=`readlink -f "$0" || echo "$0"` +RUN_PATH=`dirname "${SCRIPTSRC}" || echo .` + +install_prefix="$(realpath -- "${RUN_PATH}/..")" + cd "${RUN_PATH}/.." if [ -z "$HANDLER" ]; then - HANDLER=`pwd`/etc/handle_secondlifeprotocol.sh + HANDLER=$install_prefix/etc/handle_secondlifeprotocol.sh fi -# Register handler for GNOME-aware apps -LLGCONFTOOL2=gconftool-2 -if which ${LLGCONFTOOL2} >/dev/null; then - (${LLGCONFTOOL2} -s -t string /desktop/gnome/url-handlers/secondlife/command "${HANDLER} \"%s\"" && ${LLGCONFTOOL2} -s -t bool /desktop/gnome/url-handlers/secondlife/enabled true) || echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} failed. -else - echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} not found. -fi +function install_desktop_entry() +{ + local installation_prefix="$1" + local desktop_entries_dir="$2" + + local desktop_entry="\ +[Desktop Entry]\n\ +Name=Second Life SLURL handler\n\ +Path=${installation_prefix}\n\ +Exec=${HANDLER} %u\n\ +Icon=${installation_prefix}/secondlife_icon.png\n\ +Terminal=false\n\ +Type=Application\n\ +StartupNotify=true\n\ +StartupWMClass="com.secondlife.indra.viewer"\n\ +NoDisplay=true\n\ +MimeType=x-scheme-handler/secondlife\n\ +X-Desktop-File-Install-Version=3.0" -# Register handler for KDE-aware apps -for LLKDECONFIG in kde-config kde4-config; do - if [ `which $LLKDECONFIG` ]; then - LLKDEPROTODIR=`$LLKDECONFIG --path services | cut -d ':' -f 1` - if [ -d "$LLKDEPROTODIR" ]; then - LLKDEPROTOFILE=${LLKDEPROTODIR}/secondlife.protocol - cat > ${LLKDEPROTOFILE} <<EOF || echo Warning: Did not register secondlife:// handler with KDE: Could not write ${LLKDEPROTOFILE} -[Protocol] -exec=${HANDLER} '%u' -protocol=secondlife -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -EOF - else - echo Warning: Did not register secondlife:// handler with KDE: Directory $LLKDEPROTODIR does not exist. - fi - fi -done + echo " - Installing protocol entries in ${desktop_entries_dir}" + WORK_DIR=`mktemp -d` + PROTOCOL_HANDLER="secondlife-protocol.desktop" + echo -e $desktop_entry > "${WORK_DIR}/${PROTOCOL_HANDLER}" || "Failed to create desktop file!" + desktop-file-install --dir="${desktop_entries_dir}" "${WORK_DIR}/${PROTOCOL_HANDLER}" || "Failed to install desktop file!" + rm -r $WORK_DIR + xdg-mime default "${desktop_entries_dir}/${PROTOCOL_HANDLER}" x-scheme-handler/secondlife + + update-desktop-database "${desktop_entries_dir}" +} + +if [ "$UID" == "0" ]; then + # system-wide + install_desktop_entry "$install_prefix" /usr/local/share/applications +else + # user-specific + install_desktop_entry "$install_prefix" "$HOME/.local/share/applications" +fi diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index 3019e844d2..7e7a9a5e49 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -1,35 +1,12 @@ #!/bin/bash -## Here are some configuration options for Linux Client Testers. -## These options are for self-assisted troubleshooting during this beta -## testing phase; you should not usually need to touch them. +## Here are some configuration options for Linux Client Users. ## - Avoids using any OpenAL audio driver. #export LL_BAD_OPENAL_DRIVER=x -## - Avoids the optional OpenGL extensions which have proven most problematic -## on some hardware. Disabling this option may cause BETTER PERFORMANCE but -## may also cause CRASHES and hangs on some unstable combinations of drivers -## and hardware. -## NOTE: This is now disabled by default. -#export LL_GL_BASICEXT=x - -## - Avoids *all* optional OpenGL extensions. This is the safest and least- -## exciting option. Enable this if you experience stability issues, and -## report whether it helps in the Linux Client Testers forum. -#export LL_GL_NOEXT=x - -## - For advanced troubleshooters, this lets you disable specific GL -## extensions, each of which is represented by a letter a-o. If you can -## narrow down a stability problem on your system to just one or two -## extensions then please post details of your hardware (and drivers) to -## the Linux Client Testers forum along with the minimal -## LL_GL_BLACKLIST which solves your problems. -#export LL_GL_BLACKLIST=abcdefghijklmno - -if [ "`uname -m`" = "x86_64" ]; then - echo '64-bit Linux detected.' -fi +## GL Driver Options +export mesa_glthread=true ## Everything below this line is just for advanced troubleshooters. ##------------------------------------------------------------------- @@ -41,15 +18,8 @@ fi ## 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' - -## - The 'scim' GTK IM module widely crashes the viewer. Avoid it. -if [ "$GTK_IM_MODULE" = "scim" ]; then - export GTK_IM_MODULE=xim -fi -if [ "$XMODIFIERS" = "" ]; then - ## IME is valid only for fcitx, not when using ibus - export XMODIFIERS="@im=fcitx" -fi +#export ASAN_OPTIONS="halt_on_error=0 detect_leaks=1 symbolize=1" +#export UBSAN_OPTIONS="print_stacktrace=1 print_summary=1 halt_on_error=0" ## Nothing worth editing below this line. ##------------------------------------------------------------------- @@ -68,6 +38,8 @@ cd "${RUN_PATH}" ## 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. @@ -92,10 +64,3 @@ if [ $LL_RUN_ERR -ne 0 ]; then # generic error running the binary echo '*** Bad shutdown ($LL_RUN_ERR). ***' 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 |
