Index: scripts/soffice.sh
===================================================================
RCS file: /cvs/framework/desktop/scripts/soffice.sh,v
retrieving revision 1.25
diff -u -u -r1.25 soffice.sh
--- desktop/scripts/soffice.sh	5 Jul 2006 22:33:58 -0000	1.25
+++ desktop/scripts/soffice.sh	9 Sep 2006 11:07:33 -0000
@@ -189,6 +189,24 @@
 OPENOFFICE_MOZILLA_FIVE_HOME="$sd_inst/program"
 export OPENOFFICE_MOZILLA_FIVE_HOME
 
+if [ -z "$MOZILLA_CERTIFICATE_FOLDER" ]; then
+	db=""
+	dir=""
+	for d in $HOME/.mozilla/firefox $HOME/.firefox $HOME/.mozilla-thunderbird $HOME/.mozilla/default $HOME/.mozilla; do
+		if [ -z "$dir" -a -d "$d" ]; then
+			dir=$d;
+		fi;
+	done
+	if [ -n "$dir" ]; then
+		cert8=`find $dir -name "cert8.db" | head -n 1`
+		if [ -n "$cert8" ]; then
+			profiledir=`dirname "$cert8"`
+			MOZILLA_CERTIFICATE_FOLDER=$profiledir
+			export MOZILLA_CERTIFICATE_FOLDER
+		fi
+	fi
+fi
+
 unset XENVIRONMENT
 
 # uncomment line below to disable anti aliasing of fonts
