Jul 10 2004

Making firefox your default browser (and open URLs in a new tab) in Gnome

Published by Adam at 4:44 pm under ,

Okay, that was a wordy title but what can I say, it fits the bill. I wanted to use Firefox as my default browser, yet open new links in a new tab. This is how I managed to make it work.

I created firefox-tab.sh in my ~/bin. In it, I put in one line:

firefox -remote “openurl($@, new-tab)” || firefox “$@”

What this does is tell firefox to open the url in a new tab, or if firefox isn’t running, launch firefox and open the url.

Next, I told GNOME to use `~/bin/firefox-tab.sh %s` as my default browser (vary as necessary for your window manager). Now, whenever I click on a link, it opens in firefox. It’s quick, simple, and does what it needs to do. I’d prefer to make it open the tab in the background, but I haven’t found anything in the remote documentation that indicates this is possible.

One Response to “Making firefox your default browser (and open URLs in a new tab) in Gnome”

  1. Pan Lifengon 09 Aug 2004 at 10:29 pm

    In Firefox; under Tools|Options|Adanced|Browsing, see “Open links in the background”. Hope it works for you.

Trackback URI | Comments RSS

Leave a Reply