For a long time, I’ve been using both Firefox and Brave browsers to keep my “work” and “home” browsing separate. This setup worked, but it always felt cumbersome, and I longed for an easier way to switch between profiles in Firefox. My initial search led me to believe that Firefox didn’t have a straightforward option for this.

Then I stumbled upon Profile Switcher for Firefox. This extension enables seamless profile switching in Firefox, much like Chrome’s profile switcher. It was a game changer! However, there was still one minor inconvenience: I had to first open the default profile and then select the desired profile from the browser extension menu.

If you’re using Firefox on GNOME (e.g., on Pop!_OS), you might want to add custom options when you right-click on the Firefox icon in your dock. This tutorial will show you how to add an “Open a New profilename Window” option to the Firefox context menu.

Prerequisites

  • GNOME desktop environment
  • Firefox installed

Steps

1. Locate and Copy the Firefox .desktop File

Firefox, like most applications, has a .desktop file typically located in /usr/share/applications/. Let’s start by copying this file to your local applications directory.

cp /usr/share/applications/firefox.desktop ~/.local/share/applications/

2. Modify the .desktop File

Next, open the copied .desktop file in your favorite text editor. Here, we’ll use nano.

nano ~/.local/share/applications/firefox.desktop

In the file, find the Actions line and append new-profilename-window; to the end. For example:

Actions=new-window;new-private-window;new-profilename-window;

Then, add the following section at the bottom of the file:

[Desktop Action new-profilename-window]
Name=Open a New profilename Window
Exec=firefox -P "profilename"

Make sure to replace profilename with the name of the Firefox profile you want to open.

3. Reload GNOME Shell

For the changes to take effect, you might need to reload GNOME Shell. Do this by pressing Alt+F2, typing r, and pressing Enter. If you’re not in a Wayland session, this action will refresh GNOME Shell without closing your active applications.

4. Test Your New Option

Right-click on the Firefox icon in your dock or application launcher. You should now see an “Open a New profilename Window” option in the context menu.

5. Create the Firefox Profile (If Needed)

If you haven’t yet created the “profilename”, close all Firefox instances and run:

firefox -P

This command opens the Firefox Profile Manager, where you can create and rename profiles.