Hacker News new | ask | show | jobs
by notafox 16 days ago
You can use Firefox with different profiles and configure it to launch particular profile directly, without launching default profile and using about:profiles.

Firefox with a non-default profile can be created like that:

  ./firefox -CreateProfile "profile-name /home/user/.mozilla/firefox/profile-dir/"
  # For, say, cloudflare that would be:
  ./firefox -CreateProfile "cloudflare /home/user/.mozilla/firefox/cloudflare/"
And you can launch it like that:

  ./firefox -profile "/home/user/.mozilla/firefox/profile-dir/"
  # For cloudflare that would be:
  ./firefox -profile "/home/user/.mozilla/firefox/cloudflare/"
So, given that /usr/bin/firefox is just a shell script, you can

    - create a copy of it, say, /usr/bin/firefox-cloudflare
    - adjust the relevant line, adding the -profile argument
If you use an icon to run firefox (say, /usr/share/applications/firefox.desktop), you'll need to do copy/adjust line for the icon.

Of course, "./firefox" from examples above should be replaced with the actual path to executable. For default installation of Firefox the path would be in /usr/bin/firefox script.

So, you can have a separate profiles for something sensitive/invasive (linkedin, cloudflare, shops, banks, etc.) and then you can have a separate profile for everything else.

And each profile can have its own set of extensions.

4 comments

They're blocking Firefox quite often. Stripe does something that makes Firefox hang. I use Chrome for those sites and then go back to Firefox...
You do now do this from `Profiles` menu too, without going down to CLI path. It's extremely simple now.
If that works for you - that's fine.

I'd argue, that for some, CLI path is actually cleaner.

You see, the way described above creates entirely separate points of entry, and you don't have to go to the central menu to launch specific profile.

It eliminates one step (Profile Manager, about:profiles or whatever) allowing you to get faster to the desired profile - same way you'd launch a default profile.

It's logical separation too. It's like separate browsers from UX standpoint (they do use the same distribution though ...unless they aren't - you can configure different distributions for different profiles - nothing stops you from that).

We are not in any kind of disagreement :)

I'm just leaving the information about the gui option to other who may not be aware that it can be done from the gui too, and think its difficult to do in Firefox.

What does profile-switching provide that switching containers within a single profile doesn't?

Edit: I RTFA'd, containers can't adjust `privacy.resistfingerprinting`. Boo

- Independent set of extensions (independently configured) for each profile.

- Independent set of settings/about:config parameters.

You can't turn off, say, WebRTC completely for some profiles, while allowing it for other profiles.

Different history. I remember accidentally nuking history of a few years - that wasn't fun. Now, you reduce blast radius.

Proxy on/off or different proxies. Though, there's probably an extension that manages it on per-site basis.

Different userChrome.css, if you fancy that.

>I remember accidentally nuking history of a few years - that wasn't fun.

If you are on linux I can't recommend enough using a COW filesystem like btrfs and zfs with snapshots. I can't count the amount of times i have wiped or edited something by mistake and then restored it within seconds with it.

Except that fingerprinting means that both profiles are actually tied together by cloudflare (and other tech companies)
I think the idea is that they have the functionality that cloudflare is using to generate the fingerprint (like webGL in this case) disabled in their non-cloudflare profile and only use the cloudflare profile to do things they have to that are behind cloudflare
that's why I use completely different browsers with different settings. my CF-friendly one (not my daily driver) is `firejail --private chromium` so it always starts with a clean temporary profile