You can use your menu launcher creator (or right click the desktop and select new launcher, depending on what desktop you are on) to fashion two new firefox
launchers. The command you need for each launcher is, for example:
firefox -Profile /home/mike/.mozilla/firefox/55divdmr.Mike2 -no-remote
This will launch firefox
with that profile and make sure that it doesn't connect to any other running instance of firefox
with the essential -no-remote
switch.
If you wanted to do it manually, the desktop shortcut would look something like this; you could create it in a text-editor and name it firefox2.desktop
:
[Desktop Entry]
Type=Application
Name=fox2
Comment=my second profile
Exec=firefox -Profile /home/mike/.mozilla/firefox/55divdmr.Mike2 -no-remote
Path=/home/mike
Icon=/my/icon/location
Terminal=false
StartupNotify=false
Something else I recommend is going to your firefox folder ( mine is /home/mike/.mozilla/firefox
) and checking that the StartWithLastProfile
setting in profiles.ini
is false:
[General]
StartWithLastProfile=0
This is because it can get confusing if you are using different profiles and you start firefox
as normal without using a special shortcut and it just loads the last profile used.
You can also get prompted each time for which profile to use by making sure 'don't ask at startup' is unchecked, which is in the firefox ProfileManager
settings below. This setting is reached with
firefox -ProfileManager -no-remote
as noted in the question you referred to.
![enter image description here](https://i.stack.imgur.com/2032j.png)
For more information on the command switches available for firefox
see man firefox
or the Ubuntu manpages online. Further support is available at mozilla.org.
Try grep 'Path=' ~/.mozilla/firefox/profiles.ini | sed s/^Path=//
. Default profile folder name is stored in profiles.ini
. This will work fine while you've got single profile.
If you have more than one Firefox profile then the file format changes, so extracting the folder name becomes more tricky. Here's the script to do that:
#!/bin/bash
cd ~/.mozilla/firefox/
if [[ $(grep '\[Profile[^0]\]' profiles.ini) ]]
then PROFPATH=$(grep -E '^\[Profile|^Path|^Default' profiles.ini | grep -1 '^Default=1' | grep '^Path' | cut -c6-)
else PROFPATH=$(grep 'Path=' profiles.ini | sed 's/^Path=//')
fi
echo $PROFPATH
This script will work in both cases, it selects the appropriate method depending on the amount of profiles. Works in OSX, too.
Best Answer
WARNING: This will delete everything in the Firefox config - there is no undo.
With that out of the way, to do that, you can run the following in the terminal.
This will delete local settings and cache, including the extensions.
EDIT: Thanks to one of the comments, there is a way to backup the firefox config. To do that, follow the line below instead.
cd ~/.mozilla && mkdir backup && cp -r ./extensions ./backup && cp -r ./firefox* ./backup && rm -rf ./firefox* ./extensions