Configuring Firefox so its Tab/Window Behavior isn’t Annoying

I toggled a setting in Firefox a couple days ago and its tab/window behavior changed in a way that was exceptionally annoying. It took me a while to to find the now-hidden settings (who removes options only from the UI?) to reset the behavior, so I’m recording it here for next time.

I want it to create a new window when an external app tells it to open a URL, and to use a tab when I click on a link that would open a new window from a page I’m already viewing (such as search results). That prevents apps like Quicksilver from opening tabs in the “last active” window that happens to be on another Spaces desktop, but also doesn’t clutter my screen with zillions of new windows as I browse.

FF 3.0.8 for Mac OS X has an option to tell it whether to open new tabs or windows by default.

It used to have separate options for what to do when an external application asked for a URL to be opened vs. when you clicked on a link on a page. I guess someone decided that was confusing. This Cnet article describes how to turn it on:

The options for this behavior are shown at the top of the Tabbed Browsing panel in the Preferences window. If you ever feel the need to set this preference via About:config, look for Setting this preference to 1 opens the link in the current tab and window, 2 opens it in a new window, and 3 opens it in a new tab in the front window.

Along the way I found another semi-useful setting via Lifehacker that opens a new tab when you use the search box.

Type about:config into the address bar, and then put the following into the filter box: Double-click the value to change it to true.

Now every search comes up in its own tab and I don’t lose any open pages.