8

I use this command from the Terminal to launch a URL in Firefox:

firefox reader.google.com &

I put the ampersand at the end so that it won't put my Terminal window in the background, but Gnome just ignores this and opens a new Firefox browser window on top of the Terminal. Is there a way to launch Firefox behind the Terminal? What I want to do is continue working on the command line while the page loads, which sometimes can take a few seconds.

Volker E.
  • 5,911
  • 11
  • 47
  • 64
dan
  • 43,914
  • 47
  • 153
  • 254

3 Answers3

8

In firefox's about:config page set preference:

'browser.tabs.loadDivertedInBackground' to 'true'.
McPherrinM
  • 4,526
  • 1
  • 22
  • 25
  • But this unfortunately has some undesirable side effects... e.g. the page is opened in a background tab, which I would prefer to be selected. – dan Feb 16 '10 at 23:21
  • You can muck with your window manager's "Focus Stealing Prevention" to get something closer to what you want, perhaps. – McPherrinM Feb 17 '10 at 05:55
0
firefox "http://www.google.com/" &

This works for me just fine. Try using quotes and a full URL.

Mech
  • 2,904
  • 3
  • 24
  • 29
  • This works so long as tabs are off. Which I might do because the above method has side effects – dan Feb 16 '10 at 23:22
-2

firefox & -Will just open in background and you can surf. firefox --search "your text" & could directly give you the search results for to open in separate tab or windows just try --new tab or -- new windows followed by your url. you can find it just give firefox --help in terminal