Previously, I wrote how to open multiple instances of Safari and Firefox (here). However, the procedure won’t work for the newer versions of Firefox. So, we need a workaround.
Here is the solution. Save the following script to the location of your choice.
#!/bin/bash export ProfDIR="/Users/$USER/Library/App*/Firefox" export BINDIR="/Applications/Firefox.app/Contents/MacOS" #Creating a Randomly named profile RandomNumber=$RANDOM $BINDIR/firefox-bin -CreateProfile $RandomNumber #Copying the default profile over cp -R $ProfDIR/Profiles/*.default/* $ProfDIR/Profiles/*.$RandomNumber/ # Running the new instance of the Firefox $BINDIR/firefox-bin -p $RandomNumber #Removing the created Profile rm -rf $ProfDIR/Profiles/*.$RandomNumber #Removing the profile name head -n 7 $ProfDIR/profiles.ini > tmp cat tmp > $ProfDIR/profiles.ini rm -rf tmp
Make sure that you give the executing permission to the script with chmod command. Then, if you call the script above, it will create a new instances of FireFox for you.let’s say we have stored the script in ~/myscripts/firefox. Then all you need to do is to type:
Remember, this assumes the default profile is the only profile present and you are going to start the Firefox with the default profile. So, if you have multiple profile already created then make sure you adjust the code in “Removing the profile name” section. As Always, use at your own risk rules apply.
Hope this will help.