I have several instances of Firefox with several different profiles running. Among them profiles with the names "software" and "test".

I am trying to open an URL from a bash script to have it open in profile "test", like this:

firefox -P "test" http://www.example.org/

However that opens it in profile "software" anyway. Any ideas?

Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100308 Iceweasel/3.5.8 (like Firefox/3.5.8)

No, it is not a permissions problem, all my profile directories are perfectly under my permissions:

root@przehyba:~/.mozilla# ls -ld firefox/
drwx------ 13 miernik miernik 4096 Mar 11 09:15 firefox/
root@przehyba:~/.mozilla# ls -ld firefox/*
drwxr-xr-x  9 miernik miernik 4096 Mar 12 11:29 firefox/info
-rw-r--r--  1 miernik miernik  560 Mar 11 09:15 firefox/profiles.ini
drwxr-xr-x 10 miernik miernik 4096 Mar 16 11:51 firefox/software
drwxr-xr-x  9 miernik miernik 4096 Mar 11 09:14 firefox/tech
drwxr-xr-x 11 miernik miernik 4096 Mar 15 22:48 firefox/test
root@przehyba:~/.mozilla# 
link|improve this question
feedback

4 Answers

You should be able to add the -no-remote to only the test profile call (after the software profile is already open) like this:

firefox -P "test" -no-remote http://www.example.org/

That should allow all other links to still open in your other profile remotely.

If this solution does not work you could always run Firefox as a separate user for testing, using sudo -u. Firefox really should be able to handle this properly with profiles though.

link|improve this answer
feedback

If you already have an instance running, Firefox will reuse that. Try firefox -no-remote.

link|improve this answer
But I want it to reuse an instance! Only a specific one, not any random one it likes. If I tried adding "-no-remote" to my command, I get: "Iceweasel is already running, but is not responding. To open a new window, you must first close the existing Iceweasel process, or restart your system." – miernik Mar 12 '10 at 7:48
Ah, that makes it more interesting. I am afraid I do not know how you could do that. IIUC, -no-remote disables "talking" between instances. This may be way off target and total overkill, but you could create an extension that polls a central file or server URL queue and opens it when it is meant for the current profile. You then install that extension in all of your instances. – janmoesen Mar 12 '10 at 7:54
feedback

@miemik

"But I want it to reuse an instance! Only a specific one, not any random one it likes. If I tried adding "-no-remote" to my command, I get: "Iceweasel is already running, but is not responding. To open a new window, you must first close the existing Iceweasel process, or restart your system."

You have a permission problem with your profile dir...check the permission. Did you copy or move it from anyother place(partition..disk..)?

Solution:

Become root and run top to see if it's running as root. Then ls -ld on the profile dir(whichh should be under ur home dir with a period(.) in front of them..means you have to use "ls -al" to see it.

Verify other permission of that dir and change accordingly.

Cheers!

link|improve this answer
I checked the permissions and pasted the result in an edit to my question. It is not that problem. – miernik Mar 16 '10 at 10:56
feedback

It won't work. The only way to have 2 instances of a Mozilla app running is by disabling remote connections to the second one (usually with MOZ_NO_REMOTE=1). That means you disable the ability for it to communicate with other instances (like one creating opening a new page).

So your choices are either to open a new app with no remote enabled, or to reuse the instance that allows remote access.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.