Hacker News new | past | comments | ask | show | jobs | submit login

Firefox profiles are so underrated and (seemingly) underused. I create shortcuts for every profile, with the command to launch being `firefox --no-remote -P profilenamehere`. After that, I barely ever see the profile management dialogue, I just use each profile like it's a different browser.

It's convenient to isolate work and personal browsing, convenient to try out different extensions (eg. I have Treestyletabs in one and Sidebery in another, just to evaluate both and see for myself), and the memory usage of running two Firefox profiles is much less than if I ran Firefox and a Chromium browser instead.




I don't like profiles, because I find it hard, impossible maybe, to tell Discord to open the funny links my friends send me in the Personal profile, and Slack to open the work related links in the Professional profile.

I ended up having one profile configuration file and a keyboard shortcut that toggled between two different symbolic links, plus a Gnome extension to display the currently selected profile in the top bar, so I would use one profile during the work hours and another one during the evening, but it was slow, difficult to export to other computers and just messy altogether.

So now I'm using Firefox containers and I'm mostly happy with them. I wish the bookmarks bar would change depending on the currently selected tab however.


I use profiles not containers, and have links opening using the correct profile by wrapping stuff with the `BROWSER` environment variable. For example my Signal.desktop launcher contains this line

    Exec=env BROWSER='firefox -P personal' signal-desktop -- %u
For other apps I use `firefox -P work`, e.g. a shell alias for AWS SSO.


Unfortunately this doesn't seem to work to make Thunderbird open links in a particular Firefox profile due to this 21 year old bug: https://bugzilla.mozilla.org/show_bug.cgi?id=216252.


This is a really cool trick, but the nice thing about containers is that you can do this based on where the link is going rather than where the link is coming from.


I use profiles because I want state isolated for my purpose, not per web origin. So for example, I may need to visit google sites related to my employer's Gsuite, or my personal account used with GMail and phone, or as an anonymous user.

This also means that I have become somewhat resistant to scripted UI integrations. I don't really want my apps or sites calling willy-nilly into each other. I want _links_ which I can deliberately copy/paste into different profiles depending on my goals. E.g. do I want to visit someone's Google drive shared link as my personal account, work account, or anonymously so it doesn't pollute either of my drive UIs?


You could set BROWSER to a script which takes a URL on its command line, uses zenity to pop up a dialogue box showing it to you, with a button for each browser profile, then opens it in the selected one. With buttons for "Do not open", "Copy to clipboard", etc.


Just the dialog box with $1 should suffice. I do this on Windows. I can copy it to whichever appropriate browser, or simply dismiss it. I have my terrible source code somewhere on the Internet, but it should take less than couple femtoseconds for any HN readers to write their own, I suppose. I recommend everyone do this.


I have considered doing exactly this on many occasions but have never gotten around to putting it together - though I hadn't considered using Zenity.

I think a polished packaged cross platform app that does this would have some audience -akin to the intent dialogues on android & ios.


You could set BROWSER to a script which inspects the URL and dispatches to the right profile. This would be mildly awful but extremely unixy.


As I don't use them, I wonder if you can combine the two? So that every source is contained and each destination is contained as well. Might get a bit annoying with somethings, but.


Yes, you can. I use both. My personal profile & work profile are different, and have different container settings.


I thought Signal-desktop was electron-only. Are you running it on Firefox, or is this something else.


I think this is about where the Signal App opens links you click within it. So all links opened in Signal always open in their personal Firefox profile for example


Aah, thanks a lot. I’ve been using Junction on KDE for this, which shows a selection screen for links clicked elsewhere.


Yes, exactly that.


I've been making a "browser switcher" which you can set as the default browser and you can pick which browser to open links in (using a UI similar to the alt-tab UI). I currently have it working with Chrome profiles, but I suspect Firefox profiles wouldn't be too hard (so long as you can open a link in a specific profile from the command line).


That sounds awesome. Can you share your repo, if it's public?


The current version isn't really ready for public consumption right now I'm afraid (the current version has my favourite Chrome profiles hard coded, and some weird debug logging to a hard coded file location). But I have been meaning to clean up and release it. So perhaps I'll get around to that soon.


Great idea! I was thinking about something similar too. Having multiple browsers doesn't have to suck...and having to fiddle with galternatives or KDE systemsettings isn't ideal.

May I suggest you to add a small (and optional!) config file to automate your UI - like e.g.:

    [Sources]
    Telegram=chrome profile B
    Discord=epiphany

    [Destinations]
    https://www.google.com=firefox profile A
If the config is there, you'd then only show the UI when neither sources nor destinations match (regexes). This would make it a must have tool IMHO :)


Yes, I'd love to do that. There is in fact already an app that does this on macOs (https://github.com/johnste/finicky). And you can chain them so that finicky runs first and then calls a chooser UI "browser" as a fallback. But I would like to incorporate it into my app so that I don't have to run two apps (and so that I can make it work cross-platform).


You can have a look at Choosy (https://choosy.app/) if a paid solution works for you. (Not affiliated at all, just a happy user).


+1 for Choosy for macOS.


The problems you're outlining are solved in chrome, and any chromium browser. I'm not saying switch. I'm saying that people have been complaining about these to Mozilla for over a decade and they won't fix it.

Most of the link based stuff is solved in other browsers by opening the link in the last active profile/window you had open. Pretty simple solution. That's all it takes, Firefox however will open links in whatever default profile you have set.. regardless of if it's open or active or not. It's a terrible behaviour. Just fixing that one thing would solve most of the big complaints people have with profiles.

I always get downvoted for saying this, but containers are not a good solution for profiles, not out of the box, and not for anyone who wants to separate work/personal.

The average user shouldn't have to install a bunch of plugins and then configure them to get the functionality that profiles gives.


My Firefox opens clicked links in the last window I had active. On macOS. Although I'm only running one profile.


I'm baffled by that behavior with Firefox. After switching back to Firefox when I gave up on Edge, it took a lot of futzing around with plugins to mostly replicate what Edge/Chrome can do natively. I don't understand why Mozilla is trying to do it the way they are.


I've been using Hammerspoon[0] to direct different links to different browsers. With a little work you can basically make links open in the right place every time, assuming that the applications are opening links in the system browser and not doing their own thing.

[0] https://www.hammerspoon.org/Spoons/URLDispatcher.html


I use both Slack and Discord webapps in the according profile, why not use that? They already run in sandboxed browser instances (I guess), so there's even less overhead running them in your browser. (I did not do extensive testing, so I might be wrong here)


You are basically saying "Don't use any native apps, ever". With chrome profiles, links are just opened in whatever profile window was last active (this is on Mac OS, but I think others are the same). It's the one thing keeping me with chrome (brave).


Linux is definitely not the same. The browser instance that was opened first wins, unless you start it with `--no-remote` flag.


You should check out "Simple Tab Groups". You can bind tabs of a certain group to always open in a specific container. On top of it you get fantastic grouping, and hiding of tabs in groups, and other controls. In this way I have container groups segmented to their own views and have no issues controlling how existing logins work between different use cases. It's also easy to back up and share between machines.

https://addons.mozilla.org/en-US/firefox/addon/simple-tab-gr...


Maybe you can build a better workflow with BetterTouchTool (https://docs.folivora.ai/docs/1003_did_open_url.html) or Choosy (https://choosy.app/)?


I have a similar requirement where I want all my work related links to open in a particular browser/profile.

I use Mac and ended up implementing something that I can tweak easily, not polished but works.

https://github.com/mechanicker/chromer


I've written my own tiny Python script for this, that launches the right executable based on the URL. It works really well for my situation with two different Firefox profiles.

Maybe it works for others, too.

Link: https://github.com/fdw/brooser


> So now I'm using Firefox containers and I'm mostly happy with them.

Seconded if for no other reason, I rarely restart my browser.

As an aside: Each night I copy my profiles over to a Firefox instance in a VM. I access it as a remote app so I can get to my containers/logins while I'm away.


In fairness, needing to play with launch arguments is probably exactly why it's so little used.


Can also be launched from about:profiles, which can't be bookmarked, so, yeah.


thanks, today I learned.

Firefox has useful about:about pages.

With some revamp they could capitalize on some of them much more. After newtab, the last addition was "Firefox View" for recently closed tabs or synced tabs. I'd wish the same for history, bookmarks and downloads. Those very much show their origin as sqlite browser.


it actually can be bookmarked. i am missing something?


I don't think so, unless they mean that the individual profiles themselves can't be bookmarked. I certainly have about:profiles bookmarked only to make it appear in the URL bar slightly faster when I start typing, but it also does open through the bookmarks menu.


> have about:profiles bookmarked only to make it appear in the URL bar slightly faster

OH! this is super clever after a decade of me typing about:config and other that I never remember completely ! this is so much easier ;p


Yeah, that's become my main use for bookmarks. I prefer to treat the URL bar like a CLI as much as I can, and to not have the bookmarks bar take up space.

Actually, it would be kind of awesome if the URL bar really could act more like a command line for the browser. Hmmm.


interesting maybe this could be done with an extension using the omnibox api...


Seems I was thoroughly misremembering. I guess I was thinking it nice to be able to pin it to New Tab or make it a toolbar button or something, and my brain just compacted that beyond recognition. Sorry for that.


I think it's OK to expect "normal people" to do that, but I've been trying to embrace my OS's feature sets (stuff like desktop shortcuts) to configure my computer how I want it to.

There can be some digging involved, but if you get things set up then you can have your cake and eat it too (most of the time at least)


It's certainly a great flexibility to have access to those kind of things, that's why a lot of technical people also like command line utilities.

But honestly there is no reason to not also provide GUIs for using these features.


Indeed. Clearly, the reasons for not making this a bit easier, are not technical. It's there and I know I can create shortcuts and launch apps with parameters but why should I go through this trouble. After I have configured everything, I don't want to tinker with my browser outside work.

A simple GUI would do the trick.


You can create .desktop files (or whatever the windows equivalent is) so you start them like normal firefox.


You can take this a step further. You can copy the existing firefox.application to ~/.local/share/applications in triplicate.

Leave the first the same, but add Hidden=true, NoDisplay=true. Then rename the other two "personal.desktop" "companyname.desktop" and change the Name values inside, and add "-P {personal/companyname}" to the Exec line.

Now your application launcher, if functioning correctly, should hide the default Firefox instance (which due to stupid Firefox behavior can do... unpredictable things), and instead you can type "personal" or "companyname" to have Firefox launch with those specific profiles.

It's really quite fantastic, as good a solution as any I could ask for.


How do you keep from getting them mixed up in the task bar when they're both running?


Presumably there’s a configuration directive to change icon?


I'm 5 days, late, but yes, I changed the Icon directive, and also I use a tiling WM and different themes per profile, so there's zero chance of mixing them up.


You can also add [Desktop action ...] sections to your .desktop file for each profile, this will add new right-click/context menu options for easy launching of the profiles from your Linux dock.


The windows equiv is .lnk. Or in GUI windows world create a shortcut and then modify the launching parameters using properties on the lnk file. You could also drop the string into .bat/.cmd files (but that would probably leave a cmd box running in the background). Downside to .lnk files is they are binary so you have to use an editor that understands them (like windows explorer).


Is the creation of .desktop files within reach of many of the poeple intimidated by command line flags?


I do that for dedicated netflix profile (with company icon) having DRM enabled, very useful.

If Firefox did extend the Profile Manager to allow for this kind of personalisation and OS integration (profiles showing up as their own, customizeable launcher icon), that'd be another win.


It's a shame that the profiles extension requires a local app to be installed.

Firefox really needs to integrate it!

https://addons.mozilla.org/en-GB/firefox/addon/profile-switc...


Wait.. does this make the profile switching UX nearly identical to chrome? I abandoned a switch attempt because I found containers inadequate and profile switching too cumbersome.


Correct.


That is not an extension maintained by Mozilla. Why do you think it’s needed for profiles? Profiles are built into Firefox and don’t need an extension to be used.


The in-browser support/UX - the ever present menu options and keyboard shortcuts - are what make Profiles so much better to use in Chrome than in Firefox. The extension attempts to bridge that gap.

Having to use about:profiles or an external application shortcut is a much worse experience overall.


What I said was that the profiles extension requires an install, not that profiles requires an extension.

It just significantly improves quality of life when working with profiles, not that it is required.


it immensely helps in creating and switching profiles. it is like how firefox support tab containers, but multi-container extension improves UX


about:profiles is not pretty but works without installing 3rd party extensions.


It's also unfortunately kind of broken (or it was last time I used it)


I don't trust extensions, so yes.


That's a useful tip. I need access to several Microsoft live/AD/teams accounts, and they just don't work well in the same browser session.

I've been using chrome profiles to separate these because the Firefox ones were a little clunky; for some reason it never occurred to me to create shortcuts per profile. Thanks!


Have you tried the Multi-Account Containers? It sounds like they might work even better for your use case.

https://addons.mozilla.org/en-US/firefox/addon/multi-account...


Yeah, I used to have the same issue with AWS because they kept your account in your session. Having containers for these things is much better than multiple profiles.

But for other things, profiles are far superior.


As you mentioned this, there is now a Firefox add-on that automatically creates the containers from the AWS SSO landing page as you click into your various accounts. It removes the need to create them manually with the Multi Account Containers add-on.

https://addons.mozilla.org/en-GB/firefox/addon/aws-sso-conta...


That's cool, although different to what I was referring to. I could totally have used this in a previous role.


I do this, exactly for the mentioned case. It's even easier than switching profiles, and you can select the container on a per tab basis.


Containers with a vertical tab manager (like Sidebery) are chef's kiss, you can create separate tab panels for each container (and configure a container to open in a certain tab panel) so you get even more differentiation of context for each container.


> I have Treestyletabs in one and Sidebery in another, just to evaluate both and see for myself

You don't have to put them in separate browsers/profiles, you can just switch which one takes the sidebar, on the fly. I use both Grasshopper[1] and Tab Center Reborn or Sideberry and switch between on the fly them depending on what features I need at any specific moment.

[1]https://news.ycombinator.com/item?id=37306058


I don't want to consciously remember to switch though. I want to naturally use both in my normal workflow, and see if I feel any difference.

(Also, because TST is familiar to me from years of usage, I'd probably end up never switching to Sidebery.)


Sadly, chrome does a much better job (for me) with chrome profiles and how well they are integrated. Extensions, shorcuts and everything. This is the ONLY thing that keeps me on chrome. Otherwise I would go FF. Safari added new profiles a few days ago. Will test it, and maybe switch to that


Same.. I would ditch chrome in a heartbeat if Firefox fixed the lowest hanging issues on profiles.


If only there would a user friendly/intuitive way to switch profiles like in every other chromium browser. I tried using the about:profile and created multiple profiles with cli but it is not user friendly at all.

Meanwhile, I am a big fan of multi containers in firefox and wish it was in chrome or edge.


Firefox profiles are indeed great. Especially as they're so easy to backup and restore across machines, even different OS. Some simple fiddling with installs.ini and profiles.ini then run Firefox with -P as you say and you're good to go.

I've used this process for over a decade, probably more than 15 years now I think about it. Hard to remember! Sadly it doesn't work with Firefox on Ubuntu anymore due to that being a snap package. I'm sure there is a simple enough solution to get it working the same with the snap version but I instead prefer to remove the snap version of Firefox on Ubuntu and use the release directly from download.mozilla.org as I have the download, install and restore all automated for Windows, macOS and Linux so why make my life harder with snaps just for Ubuntu? :)


I just copy the profile directory. I managed to implant a profile from windows to manjaro, then Ubuntu. Though I don't remember what I had to deal with in canonical's case and their snaps, it could not have been that hard given that I did it.


Does cloning profiles (by copying an existing profile content to a new folder with a new name) work seamlessly? Or does every profile have some unique identifier that can cause problems if just copied over?

The reason I ask is because I have some basic setup config that I would rather not have to manually re-do for every profile.


In my experience, just copying an existing profile to a new folder doesn't work -- you're backing up your data, but you're not creating a new profile.

So what I typically do is first create a new profile via Firefox' UI, then I just copy the data of the profile I want to clone into the corresponding data folder of the profile I just created.


I did not try cloning, but I do have several profiles whose settings/plugins are synced by using Firefox Sync (you can select which things to sync).


Is there a way to suppress the profile selection dialog on startup?


As long as a `-P profilenamehere` argument is specified, that dialog doesn't pop up (that's why I said "I barely ever see the profile management dialogue"). Just edit the default Firefox shortcut to have a `-P default` argument in its command section, and you can avoid the profile selection dialog.


goto about:profiles. select one as default




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: