Brave browser profiles need default

Description of the issue: I am using profiles to separate some sites/user accounts etc for security and ease of use. Normally I work in my ‘B’ profile but also have an ‘S’ profile which I rarely use. If I click on a link then Brave opens up the browser profile that was last opened which is annoying as I would prefer it to open my default one. So if I have just opened the ‘S’ profile and then need to click a link I have to close the S profile, close the B profile and then re-open the B profile before clicking the link to ensure it opens in the B profile.

Steps to Reproduce (add as many as necessary): 1. 2. 3.
Open Browser via Windows desktop shortcut icon to specified profile. Click on link. This will open most recently opened Brave profile.

Actual Result (gifs and screenshots are welcome!):

Expected result: That links will be opened in default profile.

**Reproduces how often:**every time

Operating System and Brave Version(See the About Brave page in the main menu):
W10x64 and Brave
Version 1.52.119 Chromium: 114.0.5735.90 (Official Build) (64-bit)

Additional Information:

While I think you are correct that there should be a default browser profile for opening links in external apps, this is not logical to implement for apps opened in the browser itself.

Consider browsing online in one profile (not default), perform a search then click a link — it would not make sense for that link to open in a separate profile. However, if you were using an app (or browser) outside of Brave and click a link, I think it would make sense to have the ability to set a default browser to open links that were clicked in this way.

That’s a Chromium thing, if you want to fix this, you would have to probably hack it.

And for that you need to modify that way HTML or any other link or protocol or whatever, opens inside Brave.
Therefore, to do that you would need to modify the registry.

I tested it and it works, you can parse any argument or variable when you click on links and all that. Just doing the same Profile Shortcuts do but on the system file/protocol/etc association side.

You have to modify the BraveSSFile and BraveSSHTM.xxxxxxxxx shell → open → command to always include the specific profile with --profile-directory=Default so it looks like… First, I must say that I use Nightly and installed it with no admin rights so my path is most likely different, so this is just an example how it looks on my side:
"C:\Users\Ukjoe\AppData\Local\BraveSoftware\Brave-Browser-Nightly\Application\brave.exe" --profile-directory=Default --single-argument %1

The SSFile and SSHTM should be in HKEY_CURRENT_USER\Software\Classes\

You can also see around here: HKEY_CURRENT_USER\Software\Clients\StartMenuInternet\Brave\Capabilities\ the the FileAssociations or URLAssociations the difference between SSFile and SSHTM, but anyway, just just so you understand what those values control.

So, It’s not complicated to figure this out and do it, but as usual, you are taking a risk to modify registry and blabla, so be careful, warning blabla.

I doubt Chromium will fix this issue, which in a way makes sense, but for people like you don’t, so you can fix it yourself.

Note: if you use Powertoys Run or FlowLauncher or something like that to quickly make browser searches, and this might even apply to apps, you have to restart apps before the effect takes places, in that case, it would be easier just to logout and login your user, so any app will use the modify path, no need to restart the whole computer, but if it doesn’t work after doing the change, it’s like when you set Environment Variables, you have to restart CMD or the Launchers for PATH or anything to take place.

@Ukjoe just a FYI, I haven’t tested on how it works when opening new links, but I did just see this behavior when I went to test a new profile on Nightly.

So it had this prompt where I had to choose which profile I wanted to use when I went to open Nightly. You see there’s a box to check/uncheck on the bottom right. If I uncheck the box, it won’t prompt me. But otherwise it seems to ask me to choose which profile is accessing the browser.

I can’t remember if that was ever a thing before, but I haven’t had to select which profile I’m using before…at least not that I can remember. Not sure if this is progress in the way you’re requesting, but figured I’d mention it in case you wanted to grab Nightly and see what you think of it.

If you go to terminal and do a: brave.exe --single-argument (which is exactly what clicking on an URL in any app would do, that screen to select the Profile, does not shown even if Show on startup is enabled.

That screen only appears if you do a normal brave.exe, that’s why the shortcuts for each individual profile have the --profile-directory= argument on them, so the profile appears right away, rather than asking for which profile you want to open.

Also the problem is like if you have both profiles opened, URLs it will open links in the last active Profile right away as the OP mentioned, you can just accidentally clicked on it 1ms, it would still open there.

That’s why using the --profile-directory=Default or --profile-directory="Profile 1", "Profile 2" and so on, as in brave.exe --profile-directory="Profile 1" --single-argument will always force to open URLs in the desired profile.

This is why modifying the registry and shortcuts or variables, have to be manually done, because they are just done the way they are done and unless they are modified the File association or protocols can’t be changed on Windows.

Of course not even the OP cared to give any reply or feedback or anything, so not much to do.

Thanks to all for your thoughts and observations. I am tempted to edit the registry but think it is probably a bit of an overkill for this issue. Looks as if Brave will not get this sorted and so might just have to grin and bear it as it is.

You only need to edit 2 registry keys, the ones for the PDF and the other HTM and protocols ones.
You can easily find them by searching brave.exe" --single-argument .

I installed Brave in another computer with admin rights because for the ‘user’ installation, the BraveHTML key is different. But anyway, the Keys should be:



and just replace the value’s data with C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" --profile-directory=Default --single-argument %1

just adding the --profile-directory=Default before the --single-argument

And done.

From there, you can always export the keys, so you can just double click and replace them if Brave changes anything on an update.

The regfile should look like this:

Windows Registry Editor Version 5.00

@="\"C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe\" --profile-directory=Default --single-argument %1"

@="\"C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe\" --profile-directory=Default --single-argument %1"

If you need help, you can always post screenshots of your registry, but it is easy.
I have hacked Brave for a lot of things, while it might be some work, the truth is, if it can be done, then, there is no reason why we shouldn’t do it ourselves and live waiting for Brave team to do it someday in an unknow future.

Thanks for the detailed explanation of how to do it. I have had a look and all looks straightforward but I note that my PC has a ‘value data’ of:

“C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe” --single-argument %1

which is identical to what you put except for having single \ rather than \ and a single \ at the end after brave.exe

So may do this but comments appreciated.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.