Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open URL in already-opened Firefox profile

I've got a couple Firefox profiles constantly open on my Mac (I'm running Snow Leopard), and I'd like a command that will open a new tab in one of them. I've been trying variations on this:

firefox -P targetProfileName -remote "openurl(http://example.com, new-tab)"

but it keeps complaining that "A copy of Firefox is already open. Only one copy of Firefox can be open at a time." I know it's already open; I want the new tab in the window that's already there. Any idea how to do that? Thanks in advance for the help!

like image 611
Alan Avatar asked Feb 06 '11 06:02

Alan


3 Answers

Try open -a Firefox 'http://example.com/'. This opens the given URL with Firefox, starting it if it doesn't already run.

If you skip the -a Firefox part, then the URL will be opened with the default browser.

like image 194
maxelost Avatar answered Oct 12 '22 20:10

maxelost


If you have Mozilla Firefox already open with the Default profile or anyother profile, try:

Path-To/firefox -remote openurl("http://www.example.org")

Tested and worked for me with Mozilla Firefox from 2.x to 12.x

like image 29
Ipers Avatar answered Oct 12 '22 20:10

Ipers


I'm not sure how remoting works on the Mac as I don't have one, but on Windows and Linux you can only have one profile enabled for remoting at once; you need to start that profile normally, and and all the other profiles with -no-remote.

like image 29
Neil Avatar answered Oct 12 '22 22:10

Neil