14

I followed the instructions present here in order to use two Firefox profiles simultaneously. But I would like to make this process faster by starting each profile from its own shortcut. How do I create a shortcut to launch each profile?

3 Answers3

14

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

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.

3

I find this works:

  1. Open file explorer
  2. Navigate to /usr/share/applications
  3. Right-click on the Firefox link and select copy
  4. Click on your desktop and select paste
  5. Right click on the icon that has just been created and select properties
  6. On the Basic tab fill command: firefox -no-remote -P "profile name"
  7. On the Permissions tab check Execute

ScreenShot

Done!

David Foerster
  • 36,890
  • 56
  • 97
  • 151
dimaqw
  • 131
  • 2
0

I tried to follow some of the answers, but that didn't work for me. What worked for me was to create on Desktop a firefox.desktop file with the contents:

[Desktop Entry]
Version=1.0
Type=Application
Exec=/usr/bin/firefox -profile /home/user/.mozilla/firefox/Profiles/2ab123np.default -no-remote %u
Terminal=false
X-MultipleArgs=false
Icon=firefox
StartupWMClass=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=application/json;application/pdf;application/rdf+xml;application/rss+xml;application/x-xpinstall;application/xhtml+xml;application/xml;audio/flac;audio/ogg;audio/webm;image/avif;image/gif;image/jpeg;image/png;image/svg+xml;image/webp;text/html;text/xml;video/ogg;video/webm;x-scheme-handler/chrome;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/mailto;
StartupNotify=true
Actions=new-window;new-private-window;open-profile-manager;
Name=Firefox
Comment=Browse the World Wide Web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer;
X-GNOME-FullName=Firefox Web Browser

[Desktop Action new-window] Exec=firefox --new-window %u Name=New Window

[Desktop Action new-private-window] Exec=firefox --private-window %u Name=New Private Window

[Desktop Action open-profile-manager] Exec=firefox --ProfileManager Name=Open Profile Manager

I copied the contents for the firefox application shortcut in the application folder. And you have to enable Allow Launching from the desktop shortcut's context menu.

The files in my profile were in the folder /home/user/.mozilla/firefox/Profiles/2ab123np.default . For example here are the files prefs.js and places.sqlite and others.