On my system, I wanted Firefox profiles to feel like their own browser instances. Meaning, their own app icons and to not be grouped together. Almost like how it is on MacOS.

To do this, I had to make multiple .desktop files. Here are the contents of that file. This targets flatpak, but it should work for traditional Firefox installs too.

I called this profile “Personal”. Note that this says --profile "/home/USERNAME/.var/app/org.mozilla.firefox/config/mozilla/firefox/personal". In this, “personal” is a symlink to the real profile folder name located in the same directory.

[Desktop Entry]
Version=1.0
Type=Application
Exec=/usr/bin/flatpak run >--env=MOZ_APP_REMOTINGNAME=Personal >--branch=stable --arch=x86_64 --command=firefox >--file-forwarding org.mozilla.firefox --profile "/home/USERNAME/.var/app/org.mozilla.firefox/config/mozilla/firefox/personal" --name org.mozilla.firefox.Personal >--class org.mozilla.firefox.Personal @@u %u @@
Terminal=false
X-MultipleArgs=false
Icon=/home/USERNAME/.local/share/icons/firefox-heart.png
StartupWMClass=org.mozilla.firefox.Personal
DBusActivatable=false
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;
Name=Firefox (Personal)
Comment=Fast and private browser
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer;
X-GNOME-FullName=Mozilla Firefox

[Desktop Action new-window]
Exec=/usr/bin/flatpak run >--env=MOZ_APP_REMOTINGNAME=Personal >--branch=stable --arch=x86_64 --command=firefox >--file-forwarding org.mozilla.firefox --profile "/home/USERNAME/.var/app/org.mozilla.firefox/config/mozilla/firefox/personal" --name org.mozilla.firefox.Personal >--class org.mozilla.firefox.Personal --new-window @@u %u @@
Name=New Window

[Desktop Action new-private-window]
Exec=/usr/bin/flatpak run >--env=MOZ_APP_REMOTINGNAME=Personal >--branch=stable --arch=x86_64 --command=firefox >--file-forwarding org.mozilla.firefox --profile "/home/USERNAME/.var/app/org.mozilla.firefox/config/mozilla/firefox/personal" --name org.mozilla.firefox.Personal --class org.mozilla.firefox.Personal --private-window @@u %u @@
Name=New Private Window

OC by @novafunc@discuss.tchncs.de

  • illusionist@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    4 days ago

    Nice.

    There’s also a gnome extension for a button in the top bar. But only for the old profiles, not the new ones (not that I wanted the trashy new ones anyway)

    • wltr@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      4 days ago

      What’s the difference? I surely missed the whole thing, I only remember some announcement about the new profiles being simpler and all that. What really changed? And what are you missing with the new implementation?

      • illusionist@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        4 days ago

        Iirc, you can’t have two distinct sets of bookmarks. My “work” profile has to have the same bookmarks as my “private” one.

        • wltr@discuss.tchncs.de
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          Is it the new thing? As it sounds very absurd to me. The only point of having a separate profile to me is to have a separate sync account, set of bookmarks, and extensions. If it’s all united, what’s the point in having them at all then?