[Dextrose] [PATCH 4/5] Let hulahop know about xulrunner path via envar #3064

Aleksey Lim alsroot at sugarlabs.org
Fri Oct 21 21:39:17 EDT 2011


---
 bin/sugar.in |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/bin/sugar.in b/bin/sugar.in
index d41d275..a39309c 100755
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -115,4 +115,17 @@ metacity --no-force-fullscreen -d $DISPLAY &
 
 [ -x /usr/bin/pulseaudio ] && /usr/bin/pulseaudio &
 
+if [ -z "$MOZILLA_FIVE_HOME" ]; then
+    # If xulrunner comes not from SDK, let pyxpcom/hulahop/Browse
+    # work even on xulrunner's minor distro updates.
+    # This code supplements hulahop #3064's patch.
+    for i in `ls -d /usr/lib*/xulrunner-1.* | sort -r`; do
+        if [ -e $i/libxul.so ]; then
+            export LIBXUL_DIR=$i
+            export LD_LIBRARY_PATH=$i:$LD_LIBRARY_PATH
+            break
+        fi
+    done
+fi
+
 exec sugar-session
-- 
1.7.6.1



More information about the Dextrose mailing list