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
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.
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.
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
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).
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).
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.
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.
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).
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.
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.
> 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.
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.
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.
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.
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)
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.
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.
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).
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.
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.
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.
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!
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.
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.
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.
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
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.
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.
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.