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 n开发者_StackOverflow社区ew 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!
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.
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
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
.
I had the same problem as yours designing my webpage with firefox 17.0+.
Since the profile page is already open, you wound't need the -remote option.
I was trying it as firefox -P webpage -no-remote 'openurl(%p)'
Where %p was argument.
What worked for me was to open in an existing opened profile was:
firefox -P webpage -new-tab '%p%
In 2020-01-23, this method works (assuming the profile is already open, I did not test with a closed profile).
firefox -P NAME_might_need_to_quote -new_tab URL_might_need_to_quote
Almost a decade later, I'm switching browsers to Firefox and was wondering exactly the same thing.
E.G.
firefox -P NONdefault -new_tab "https://example.com/"
精彩评论