You might want to use different Firefox profiles for many reasons. But with a native integration into the GNOME desktop experience, Firefox profiles, especially when used concurrently, can be a somewhat inconvenient to use. However, this problem can be solved using a custom .desktop file.

Showing off different launchers for different profiles

Example: “Proxyfox”

During my time as a student, I found it to be very convenient having permanent access to a browser with an university ip address (e.g. for searching papers or accessing access-restricted web pages). Assuming a Firefox profile called repr1 which is configured to use an university proxy, the following .desktop file generates a second firefox launcher in the dock.

This only works if the system Firefox has been launched first. For full flexibility, an explicit window class (e.g. --class Firefox) is to be added to all Exec commands in the standard .desktop file (e.g. /usr/share/applications/firefox.desktop).

~/.local/share/applications/proxyfox.desktop
[Desktop Entry]
Version=1.0
Name=Proxyfox
Comment=Browse the World Wide Web (via university)
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=firefox %u -P repr --class Proxyfox
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/mhoff/.local/share/pixmaps/proxyfox.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=
StartupNotify=true
Actions=NewWindow;NewPrivateWindow;

[Desktop Action NewWindow]
Name=Open a New Window
Exec=firefox -P repr --class Proxyfox -new-window

[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Exec=firefox -P repr --class Proxyfox -private-window

The icon for the above example can be downloaded here.

  1. new profiles can be created using e.g. firefox --ProfileManager