A quick post to share how I set up custom Firefox profiles in the GNOME Shell favourites menu (or variously called a dash or dock). Copying a
.desktop file is quite simple, but the tips here will give you:
- A separate icon
- A separate
WMClassso that each copy of Firefox is seen as independent by GNOME shell (open window indicator, application switching)
- A free icon 😁
The primary motivation was keeping LastPass installed on the Work profile, and Bitwarden in the Personal profile, as well as the option to run different extensions in different situations.
Create a Profile
$ firefox --ProfileManager
Keep the "Use the selected profile without asking at startup" option checked, so you don't get prompted each time.
I use Firefox on Wayland, so adjust for your setup.
$ sudo -i # cd /usr/share/applications # cp firefox-wayland.deskop firefox-work.desktop
--name, add the
-P (profile) flag with your profile name, and add a suitable
- Exec=firefox-wayland --name firefox-wayland %u + Exec=firefox-wayland --name firefox-work -P Work --class FirefoxWork %u
Add a matching StartupWMClass setting so the window manager knows which one to look for:
Copy the Firefox icon, and update the
Icon field to match (otherwise it'll get very confusing). I've adapted this briefcase icon from the Noun Project on Wikimedia Commons:
The original icon was located at
/usr/share/icons/hicolor/256x256/apps/firefox-work.png. I didn't copy the
64x64 or other sizes, because they don't get used on my desktop.
Here it is on my desktop, with the shiny little work icon, and the all the correct behaviour you'd expect (run them side by side and the icons will turn blue and switch correctly).