Since I recently changed from Chrome to Firefox, I’ve realized that Firefox does not make switching profiles as easy as Chrome does. You either need to

  • Launch Firefox with the -P command line parameter
  • Navigate to about:profiles and launch it from there

I wanted to have two separate taskbar icons that can help me differentiate between my profiles. In my case, Work and Personal.

I found a post on the ZorinOS forums that helped get me with this and I wanted to document it here in case that post ever gets removed.

This relies on creating seperate .desktop files for each profile and linking them to different icons. Below are my two sample files as well as my choices for the icons. I use blue for Work and the normal orange for Personal.

Work .desktop file

[Desktop Entry]
Version = 1.5
Icon = /usr/share/icons/firefox-work.webp
Type = Application
Name = Firefox – Work
GenericName = Firefox - Work
Comment = Firefox - Work
Terminal = false
Exec = firefox -P Work --class firefox_work --new-window
StartupWMClass=firefox_work
Categories=WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -P Work --class firefox_work --new-window %u

[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -P Work --name firefox_work --private-window %u

Personal .desktop file

[Desktop Entry]
Version = 1.5
Icon = /usr/share/icons/firefox-personal.webp
Type = Application
Name = Firefox – Personal
GenericName = Firefox - Personal
Comment = Firefox - Personal
Terminal = false
Exec = firefox -P Personal --no-remote --class firefox_personal --new-window
StartupWMClass=firefox_personal
Categories=WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -P Personal --no-remote --class firefox_personal --new-window %u

[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -P Personal --no-remote --name firefox_personal --private-window %u

Conclusion

Place these .desktop files in the /usr/share/applicaitons folder and make sure to add your image files to have different icons to /usr/share/icons.

One thing that you may or may not have noticed is that my work profile does not have the –no-remote parameter. This is excluded so that my work profile will be used to open links from other applications.

I have set this up on Linux Mint however it may work for other distros/desktop environments.