Firefox – Open a new tab in firefox and keep ff in the background


Is the a way to programmatically open a URL in a new tab in firefox without firefox gaining focus?

What I found out so far:

  • firefox -new-window <URL> lets ff stay in the background, but opens a new window instead of a tab.
  • firefox -new-tab <URL> opens <URL> in a new tab but gives focus to ff.

EDIT: What I'm trying to accomplish is making the feed reader plugin in claws mail open stuff in firefox in the background, so that I can go through my feeds and open everything that interests me and actually read all the stuff after that.
Oh and I should probably mention that a linux/gnome-only solution would be fine, too.

Best Solution

If you set browser.tabs.loadDivertedInBackground to true in about:config then -new-tab will open tabs in the background and not focus the window. This does more than you (or I) want but perhaps it is a suitable work-around for you?