Peter B. Steiger wrote:
> The first time I installed Firefox, I had a problem with clicking on
> browser links in email and Usenet because it would pop up a profile
> manager box ("Choose User Profile"), and would not let me use the same
> profile that was already in use.
I don't honestly know how it was supposed to be fixed properly. At a
guess, --disable-profile-locking would be the one, but I didn't feel
like building it again so I did the following. BTW, the original script
was taken from a website that I can't find now, sometime from the .99
series IIRC. Watch the linewrap:
mv /usr/bin/firefox /usr/lib/firefox-1.0.4/
create a new /usr/bin/firefox:
---------------------------------------------------------------------------------
#! /bin/bash
# Begin /usr/bin/firefox
retval=`ps --no-headers -C firefox-bin`
#first check to see if we contain " -" options flags
#If so, then we definately know what we are doing and
#just pass everything on to the original script.
echo $0 $@
echo "$0 $@" | grep " -" 2>&1>/dev/null
if [ "$?" == "1" ]
then
if [ "$retval" != "" ]
then
if [ -n "$1" -a -z "$2" ]
then
# generic url open (one argument is typical) but watch out as
# if no protocol given will not open a second tab...just assume http
# in the current one.
echo $1 | grep "://" 2>&1>/dev/null
if [ "$?" == "0" ]
then
# We have a protocol given in the above tests.
# Here and everywhere, we can move for a new-window if prefered
/usr/lib/firefox-1.0.4/firefox -remote "openurl($1), new-tab"
else
# We do not have a protocol
echo $1 | grep "ftp" 2>&1>/dev/null
if [ "$?" == "0" ]
then
#assume ftp protocol
/usr/lib/firefox-1.0.4/firefox -remote "openurl(ftp://${1}),
new-tab"
else
# assume http
/usr/lib/firefox-1.0.4/firefox -remote "openurl(http://${1}),
new-tab" fi
fi
else
# We know what we are doing....so just do it.
/usr/lib/firefox-1.0.4/firefox $@
fi
else
/usr/lib/firefox-1.0.4/firefox $@
fi
else
# We definately want the real thing
/usr/lib/firefox-1.0.4/firefox $@
fi
# End /usr/bin/firefox
-----------------------------------------------------------------------------
Likewise for thunderbird:
mv /usr/bin/thunderbird /usr/lib/thunderbird-1.0.2/
And the new /usr/bin/thunderbird:
-----------------------------------------------------------------------------
#! /bin/bash
# Begin /usr/bin/thunderbird
retval=`ps --no-headers -C thunderbird-bin`
if [ "$retval" != "" ]
then
if [ -n "$1" -a -z "$2" ]
then
# generic mailto (one argument is typical).
# If the mailto: proto was included, strip it off
address=`echo "$1" | sed s/mailto://`
/usr/lib/thunderbird-1.0.2/thunderbird -remote "mailto($address)"
else
# We think we know what we are doing....so just do it.
/usr/lib/thunderbird-1.0.2/thunderbird $@
fi
else
echo "$1" | grep "@" 2>&1>/dev/null
if [ "$?" == "0" ]
then
# a url was given in the first argument so start with compose window
#address=`echo "$1" | sed s/mailto://`
/usr/lib/thunderbird-1.0.2/thunderbird -compose "$1"
else
# We acutally jsut want to start the program by itself
/usr/lib/thunderbird-1.0.2/thunderbird $@
fi
fi
# End /usr/bin/thunderbird
-------------------------------------------------------------------------------
Hope that helps.
-- DJ Lucas
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page