Create any additional profiles
firefox -P
Desktop entries (launchers)
Copy the standard Firefox desktop entry file (firefox.desktop), once for each profile, and change the files to start one specific profile:
[Desktop Entry]
Name=Profile1Fox
GenericName=Web Browser
Comment=Browse the World Wide Web
Exec=/usr/lib/firefox/firefox -P profile1 %u
Icon=firefox
Terminal=false
Type=Application
StartupNotify=true
Categories=Network;WebBrowser;
P.S. Place custom .desktop files in ~/.local/share/applications
.
Handler for mailto: links
This sample script starts Outlook.com on a separate profile and goes to the "Compose" page to send an email. It works great when using "File -> Email link...", passing the proper subject line and link text in the email body.
#!/bin/bash
args=$@
args=${args/mailto:?/&}
args=${args//\(/%28}
args=${args//\)/%29}
url=https://outlook.live.com/owa/default.aspx?rru=compose$args#page=Compose
/usr/bin/firefox -P profile2 -new-tab "$url"
Script that opens windows and tabs on two profiles
#!/bin/bash
open=gtk-launch
$open profile1fox # Name of the desktop entry file
$open profile2fox # Start profile2fox.desktop to open another profile
sleep 5
/usr/bin/firefox -P profile1fox --new-tab 'https://mail.live.com'
/usr/bin/firefox -P profile2fox --new-window 'https://test.hipchat.com/chat'