It works now with firefox
29.0 on Linux:
To open a second firefox
instance with a different profile:
firefox -P second -new-instance
To open a new tab in the second instance of firefox
, which os already running:
firefox -P second -remote "openurl(http://example.com,new-tab)"
See Bug 716110 - split -new-instance flag out of existing -no-remote flag for additional hints (eg: post of Hayo).
As explained in the comments on this bug report, what is missing is a command that can be used for opening the first window and the second tab in the same way:
That could be done with a script along the lines of this (firefox-profile-instance
):
#!/bin/bash
PROFILE="$1"
URL="$2"
if firefox -P "$PROFILE" -remote "ping()" >/dev/null 2>&1 ; then
firefox -P "$PROFILE" -remote "openurl($URL,new-tab)"
else
firefox -P "$PROFILE" -new-instance "$URL" &
fi
Now, while a firefox with the default profile is already running,
the first run of this starts a new browser with profile "second":
firefox-profile-instance second "http://example.com"
and running the same again opens a second tab in the same browser:
firefox-profile-instance second "http://example.com"
Well, I might as well answer to your question.
Try using the --class
flag in firefox. If it matches the relative .desktop
file, the various instances should be grouped correctly. For example, in your .desktop file:
Exec=firefox --class FirefoxDevel %u
It works for me for the same firefox executable, so as long as your versions support that flag, you should be good to go.
Best Answer
If you are creating users with
useradd
you can file directory/etc/skel
to put files and directories in users home directories.So you should create two files:
/etc/skel/.mozilla/firefox/PROFILE_NAME/mimeTypes.rdf
with content that you need/etc/skel/.mozilla/firefox/profiles.ini
with:It should do the work with new users.