- Joined
- 16 Feb 2003
- Messages
- 2,725
I know variations of this have been posted on the web, but I never found a working script, so I fixed it [for me atleast]. Create a script in your home directory named whatever you want [I use firefox_newtab.sh].
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 by changing the browser to 'manual' and pointing it to the script, and in Thunderbird, by adding this to your prefs.js file:
user_pref("network.protocol-handler.app.http", "/path/to/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.
Code:
#!/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 by changing the browser to 'manual' and pointing it to the script, and in Thunderbird, by adding this to your prefs.js file:
user_pref("network.protocol-handler.app.http", "/path/to/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.