Application launcher for multiple Firefox profiles in Ubuntu 12.04 and 14.04
I like to use separate Firefox profiles with different add-ons for different roles like general web browsing, development, proxying, etc. In older versions of Ubuntu (Gnome 2), one could just right click the Firefox app launcher to modify startup options (see Multiple isolated instances of Firefox within a single login session on Linux), but in more recent versions (Gnome 3 and Unity), the process is a little more involved. Here's what's been working for me in Ubuntu 12.04 and 14.04.
Copy existing launcher
I start by making a copy of the existing Firefox application launcher to use as template for the custom multi profile launcher. BTW, the reason I don't just modify the default one is that breaks clicking links from other apps, so I find it easier to just setup a separate launcher.
$ sudo cp /usr/share/applications/firefox.desktop /usr/share/applications/firefox-multi.desktop
Change the Firefox launcher title to differentiate from default:
$ sudo sed -i '/^Name=Firefox/s/$/ - Multi Profile/' /usr/share/applications/firefox-multi.desktop
Before:
Name=Firefox Web Browser
After:
Name=Firefox Web Browser - Multi Profile
Change Firefox launcher options so it always pops up a window asking which profile to launch with:
$ sudo sed -i '/^Exec=/s/firefox/firefox -no-remote -ProfileManager/' /usr/share/applications/firefox-multi.desktop
Before:
Exec=firefox %u
Exec=firefox -new-window
Exec=firefox -private-window
After:
Exec=firefox -no-remote -ProfileManager %u
Exec=firefox -no-remote -ProfileManager -new-window
Exec=firefox -no-remote -ProfileManager -private-window
Add new shortcut to launcher
Then search for "Firefox" in dash (hit Super or Windows key, then type). It should now find two. Drag and drop the one named "Firefox Web Browser - Multi Profile" on to the launcher.
How to tell which profile is in use
With multiple profile windows running, it's useful to know which window belongs to which profile. The only way I've found to do this is via another add-on -- the Nightly Tester Tools extension, which (among other things) allows to modify the Firefox window title.
After installing the extension, in Firefox menu, go to "Tools" > "Nightly Tester Tools" > "Customize Titlebar", set custom title template to:
[${Profile}] ~ ${DefaultTitle}
That's it -- enjoy multiple Firefox profiles.
1 Comment
1. shiwang replies at 14th March 2015, 10:54 pm :
To the point accurate explanation of what needs to be done for creating multiple firefox profiles. Good work …!
Thnx
Leave a comment