Guillaume Hérail

Ramblings of a French guy

How to separate work/personal life on Firefox

Posted on — Nov 6, 2019

Two Firefox

I’m an avid Firefox user, both at work and in my personal life. As such I have some conflincting settings and addons. For example, I use the Lastpass addon in both contexts but since I use different accounts, I needed a way to get them to cohabitate. To cope with that, Firefox comes with profiles.

Firefox profiles?

Firefox comes with profiles, you can use them to isolate a set of settings/addons/plugins/bookmarks/…

You can have different profiles but you must set one as default. This default profile will be the one used when you start Firefox without setting a profile.

To open firefox with a different profile:

firefox -p ProfileName

This will start a new firefox instance with its own history/set of addons/settings etc.

Create a Desktop Entry for this new profile

We will need to create a new desktop entry. What I did is copying the one from Firefox and changing it to match my needs. You can find that file in /usr/share/applications/firefox.desktop.

We have different options that we will tweak there: Name, Generic Name and Exec.

In the end, your ~/.local/share/applications/firefox_perso.desktop should look like this:

[Desktop Entry]
Name=Firefox Personal
GenericName=Firefox Personal
Exec=firefox --class "Firefox Personal" -p Personal -no-remote %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox-nightly
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=new-personal-window;new-personal-private-window;
StartupWMClass=Firefox Personal

[Desktop Action new-personal-window]
Name=Open a New Window
Name[ar]=ﺎﻔﺘﺣ ﻥﺎﻓﺫﺓ ﺝﺪﻳﺩﺓ
Name[ast]=Abrir una ventana nueva
Name[bn]=Abrir una ventana nueva
Name[ca]=Obre una finestra nova
Name[cs]=Otevřít nové okno
Name[da]=Åbn et nyt vindue
Name[de]=Ein neues Fenster öffnen
Name[el]=Νέο παράθυρο
Name[es]=Abrir una ventana nueva
Name[fi]=Avaa uusi ikkuna
Name[fr]=Ouvrir une nouvelle fenêtre
Name[gl]=Abrir unha nova xanela
Name[he]=פתיחת חלון חדש
Name[hr]=Otvori novi prozor
Name[hu]=Új ablak nyitása
Name[it]=Apri una nuova finestra
Name[ja]=新しいウィンドウを開く
Name[ko]=새 창 열기
Name[ku]=Paceyeke nû veke
Name[lt]=Atverti naują langą
Name[nb]=Åpne et nytt vindu
Name[nl]=Nieuw venster openen
Name[pt]=Abrir nova janela
Name[pt_BR]=Abrir nova janela
Name[ro]=Deschide o fereastră nouă
Name[ru]=Новое окно
Name[sk]=Otvoriť nové okno
Name[sl]=Odpri novo okno
Name[sv]=Öppna ett nytt fönster
Name[tr]=Yeni pencere aç
Name[ug]=ﻱېڭﻯ ﻙۆﺰﻧەﻙ ﺉېچﻰﺷ
Name[uk]=Відкрити нове вікно
Name[vi]=Mở cửa sổ mới
Name[zh_CN]=新建窗口
Name[zh_TW]=開啟新視窗
Exec=firefox --class "Firefox Personal" -p Personal -new-window

That’s it!

Enjoy your separate Firefox instance. A tip: change your personal Firefox theme so to differentiate the two, I personnaly use Arc Dark Theme.