j79zlr
06-17-2004, 11:38 PM
I know this has been posted on the web, but I never found a working script, well I fixed it [for me atleast]. Create a script in your home directory named whatever you want [I use firefox_newtab.sh.
#!/bin/sh
export MOZILLA_FIVE_HOME="/usr/lib/mozilla-firefox"
url="$1"
if [ "x$url" = "x" ]; then
url="about:blank"
fi
if $MOZILLA_FIVE_HOME/mozilla-xremote-client -a firefox openURL\("$url",new-tab\); then
exit 0
fi
exec $MOZILLA_FIVE_HOME/firefox "$url"
Now if you point an application to use that instead of the binary it will open in a new tab instead of the "Choose Profile" dialog. Works in GAIM and in Thunderbird, by adding this to your prefs.js file:
user_pref("network.protocol-handler.app.http", "/home/joe/firefox_newtab.sh");
I am assuming that this works for mozilla in the exact same manner, by changing the FIVE_HOME path to mozilla's and the line to mozilla-xremote-client -a mozilla openURL etc; also, I would assume that you could remove the /usr/bin/mozilla binary and replace it with the shell script, and not need to point to the script then.
#!/bin/sh
export MOZILLA_FIVE_HOME="/usr/lib/mozilla-firefox"
url="$1"
if [ "x$url" = "x" ]; then
url="about:blank"
fi
if $MOZILLA_FIVE_HOME/mozilla-xremote-client -a firefox openURL\("$url",new-tab\); then
exit 0
fi
exec $MOZILLA_FIVE_HOME/firefox "$url"
Now if you point an application to use that instead of the binary it will open in a new tab instead of the "Choose Profile" dialog. Works in GAIM and in Thunderbird, by adding this to your prefs.js file:
user_pref("network.protocol-handler.app.http", "/home/joe/firefox_newtab.sh");
I am assuming that this works for mozilla in the exact same manner, by changing the FIVE_HOME path to mozilla's and the line to mozilla-xremote-client -a mozilla openURL etc; also, I would assume that you could remove the /usr/bin/mozilla binary and replace it with the shell script, and not need to point to the script then.