News for hackers. Stuff that matters.
Re:Using extra Firefox profiles to make my life better by Biganon on Friday October 20, 2023 @05:53AM (#37954143)
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.

Re:Using extra Firefox profiles to make my life better by ashirviskas on Friday October 20, 2023 @06:01AM (#37954195)
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)
Re:Using extra Firefox profiles to make my life better by r1cka on Friday October 20, 2023 @07:10AM (#37954618)
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).
Re:Using extra Firefox profiles to make my life better by folmar on Friday October 20, 2023 @07:22AM (#37954702)
Linux is definitely not the same. The browser instance that was opened first wins, unless you start it with `--no-remote` flag.
Re:Using extra Firefox profiles to make my life better by darrenf on Friday October 20, 2023 @06:49AM (#37954485)
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.
Re:Using extra Firefox profiles to make my life better by lucideer on Friday October 20, 2023 @07:33AM (#37954787)
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.
Re:Using extra Firefox profiles to make my life better by smaudet on Friday October 20, 2023 @07:44AM (#37954861)
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.
Re:Using extra Firefox profiles to make my life better by SAI_Peregrinus on Friday October 20, 2023 @11:26AM (#37957447)
Yes, you can. I use both. My personal profile & work profile are different, and have different container settings.
Re:Using extra Firefox profiles to make my life better by saltcured on Friday October 20, 2023 @11:28AM (#37957476)
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?

Re:Using extra Firefox profiles to make my life better by twic on Friday October 20, 2023 @02:06PM (#37959477)
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.
Re:Using extra Firefox profiles to make my life better by numpad0 on Friday October 20, 2023 @03:45PM (#37960635)
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.
Re:Using extra Firefox profiles to make my life better by lucideer on Saturday October 21, 2023 @05:31AM (#37965342)
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.

Re:Using extra Firefox profiles to make my life better by twic on Friday October 20, 2023 @02:03PM (#37959437)
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.
Re:Using extra Firefox profiles to make my life better by captn3m0 on Friday October 20, 2023 @08:21AM (#37955119)
I thought Signal-desktop was electron-only. Are you running it on Firefox, or is this something else.
Re:Using extra Firefox profiles to make my life better by FinnKuhn on Friday October 20, 2023 @08:24AM (#37955138)
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
Re:Using extra Firefox profiles to make my life better by darrenf on Friday October 20, 2023 @09:00AM (#37955431)
Yes, exactly that.
Re:Using extra Firefox profiles to make my life better by captn3m0 on Friday October 20, 2023 @09:12AM (#37955530)
Aah, thanks a lot. I’ve been using Junction on KDE for this, which shows a selection screen for links clicked elsewhere.
Re:Using extra Firefox profiles to make my life better by ssl232 on Friday October 20, 2023 @09:05AM (#37955472)
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.
Re:Using extra Firefox profiles to make my life better by nicoburns on Friday October 20, 2023 @07:03AM (#37954570)
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).
Re:Using extra Firefox profiles to make my life better by filcuk on Friday October 20, 2023 @07:41AM (#37954843)
That sounds awesome. Can you share your repo, if it's public?
Re:Using extra Firefox profiles to make my life better by nicoburns on Friday October 20, 2023 @08:16AM (#37955076)
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.
Re:Using extra Firefox profiles to make my life better by aruggirello on Friday October 20, 2023 @08:50AM (#37955359)
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 :)
Re:Using extra Firefox profiles to make my life better by nicoburns on Friday October 20, 2023 @09:51AM (#37955990)
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).
Re:Using extra Firefox profiles to make my life better by Maarius on Friday October 20, 2023 @09:46AM (#37955908)
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).
Re:Using extra Firefox profiles to make my life better by alwillis on Friday October 20, 2023 @01:25PM (#37958957)
+1 for Choosy for macOS.
Re:Using extra Firefox profiles to make my life better by windexh8er on Friday October 20, 2023 @08:31AM (#37955200)
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...

Re:Using extra Firefox profiles to make my life better by WarOnPrivacy on Friday October 20, 2023 @09:23AM (#37955626)
> 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.

Re:Using extra Firefox profiles to make my life better by Maarius on Friday October 20, 2023 @09:44AM (#37955889)
Maybe you can build a better workflow with BetterTouchTool (https://docs.folivora.ai/docs/1003_did_open_url.html) or Choosy (https://choosy.app/)?
Re:Using extra Firefox profiles to make my life better by mechanicker on Friday October 20, 2023 @10:00AM (#37956127)
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

Re:Using extra Firefox profiles to make my life better by Mister_Snuggles on Friday October 20, 2023 @10:09AM (#37956248)
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

Re:Using extra Firefox profiles to make my life better by intothemild on Friday October 20, 2023 @10:43AM (#37956805)
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.

Re:Using extra Firefox profiles to make my life better by E39M5S62 on Friday October 20, 2023 @12:41PM (#37958387)
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.
Re:Using extra Firefox profiles to make my life better by venatiodecorus on Friday October 20, 2023 @01:06PM (#37958716)
My Firefox opens clicked links in the last window I had active. On macOS. Although I'm only running one profile.
Re:Using extra Firefox profiles to make my life better by fdw on Friday October 20, 2023 @01:10PM (#37958762)
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