Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Desktop] Provide option to "always" open files with system default or provide "do not ask again" option #6291

Open
Brave-Matt opened this issue Oct 2, 2019 · 58 comments
Labels
design A design change, especially one which needs input from the design team feature-request needs-investigation A bug not 100% confirmed/fixed OS/Desktop priority/P4 Planned work. We expect to get to it "soon".

Comments

@Brave-Matt
Copy link

Description

As it is now, users can disable Webtorrent in settings and after doing this, the browser will prompt the user after clicking/downloading on a magnet link or torrent file, asking whether or not you'd like to use [System default torrent client] to open the file.

image

However, with this method, users are prompted every time they attempt to download a torrent/magnet file. This can be cumbersome and there should be a way to tell the browser to always default to the users preferred torrent client.

Consideration and Suggestion
When adding this feature, there should also be a way to reverse the decision so that users can choose different clients if necessary.

I would suggest adding a couple checkboxes to the UI for the simplest implementation (plz excuse the hasty shop job):
ask

And in Settings --> Extensions:
wt

cc @yrliou @rebron

@Brave-Matt Brave-Matt added feature/webtorrent Label for webtorrent related issues feature-request labels Oct 2, 2019
@bencefalo
Copy link

It would be great if when this is fixed its fixed for other apps and not just torrent... like zoom.us and webex. You are prompted every time to open zoom when browser from a zoom meeting

@o-Epictetus-o
Copy link

Yes please, we shouldn't have to click yes or no every single time we download a torrent.

@kartsims
Copy link

Weirdly, one of my Brave sessions (as in "signed-in as another user") provides this feature. When I click a torrent, it directly opens it with my default app.

I don't know how to apply this option to the other session, but it should be possible.

@Brave-Matt
Copy link
Author

I have a user reporting the same situation, but its related to different external apps (in this users case, Roblox). I think it's worth extending this particular option to include any/all external apps.
https://www.reddit.com/r/brave_browser/comments/ecvgjb/this_makes_me_wanna_switch_back_to_chrome/

@Brave-Matt
Copy link
Author

@Brave-Matt
Copy link
Author

Brave-Matt commented Jan 24, 2020

@Sntl09
Copy link

Sntl09 commented Jan 27, 2020

Yeah, sorry but this is where Brave lost me and i've uninstalled. It seemed like a great browser but the torrenting issue is a deal breaker for me. +1 to sort this

@eloquentvogon
Copy link

I use Zoom multiple times a day and I too need a "Don't ask again" option

@Brave-Matt
Copy link
Author

@Brave-Matt
Copy link
Author

@Brave-Matt Brave-Matt changed the title Feature Request (Webtorrent): Provide option to "always" open torrent/magnet files with system default Feature Request [Webtorrent]: Provide option to "always" open files with system default or provide "do not ask again" option Mar 19, 2020
@Brave-Matt
Copy link
Author

@michelle911
Copy link

+1, I too am forced to use another browser that allows this functionality, but like Brave better - please fix!

@pratyushtewari
Copy link

With more apps using the web url mechanism to open the desktop apps, e.g. Zoom, hangouts, download manager, email app, etc please consider "always allow" or "remember this app" feature.

@Brave-Matt
Copy link
Author

@eljuno
Copy link

eljuno commented Apr 21, 2020

+1 from Community

https://community.brave.com/t/configure-brave-to-use-transmission-for-magnet-links/120235?u=eljuno

@benwoodward
Copy link

+1

I have this issue with "Add to Things 3"

image

@Xan-Kun
Copy link

Xan-Kun commented Apr 24, 2020

+1 No Skype for Business = No Brave
Sadly

@ramonsmits
Copy link

Zoom, Torrents, Git, etc. it all is SO annoying that I can't just select "Don't ask again for this domain".

@ramonsmits
Copy link

ramonsmits commented May 5, 2020

Also, can the title and labeling be adjusted? Its not only for Torrents but for all applications.

@ramonsmits
Copy link

Title suggestion

Feature Request: Support ExternalProtocolDialogShowAlwaysOpenCheckbox similarly as Edge and Chrome

https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ExternalProtocolDialogShowAlwaysOpenCheckbox

For now, I'm saying goodbye to Brave and hello Chrome until this policy is supported.

@bsclifton
Copy link
Member

bsclifton commented May 5, 2020

@ramonsmits the group policy should be supported 100% - you can try via registry. More info at https://support.brave.com/hc/en-us/articles/360039248271-Group-Policy

We don't have proper group policy templates (ADM/ADMX) files available yet though... but you might check out https://github.com/Prowler2/Brave-Browser-GPO-Policy

@ramonsmits
Copy link

@bsclifton Thanks for mentioning, searching via Google didn't contain these pages. THis is because they do not mention ExternalProtocolDialogShowAlwaysOpenCheckbox . Based on your comment the following registry file should allow to restore the checkbox again.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\BraveSoftware\Brave]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:41000000

@markstuart
Copy link

markstuart commented May 12, 2020

So, you can get this to work on Linux right now... following the info from @bsclifton and @ramonsmits as well as this: https://www.chromium.org/administrators/linux-quick-start I got to this:

sudo mkdir -p /etc/chromium/policies/managed
sudo chmod -w /etc/chromium/policies/managed
sudo touch /etc/chromium/policies/managed/managed_policies.json

Edit the file using whatever you like (I used nano), and insert this json:

{
  "ExternalProtocolDialogShowAlwaysOpenCheckbox": true
}

Go to brave://policy in the Brave address bar, and you should see this policy displaying.
Then if you click on a Zoom link or whatever, you should get the checkbox, and not get asked next time.

I guess Brave will possibly stop sharing the config directory with chromium at some point? This may be a short term fix.

My setup:
OS: Ubuntu 18.04.4 LTS
Brave: Version 1.8.86 Chromium: 81.0.4044.129 (Official Build) (64-bit)

@belminf
Copy link

belminf commented May 12, 2020

Linux one-liner that worked for me:

sudo mkdir -p /etc/chromium/policies/managed && echo '{"ExternalProtocolDialogShowAlwaysOpenCheckbox": true}' | sudo tee /etc/chromium/policies/managed/protocol_open.json

No need to restart. Just needed to select the checkbox the first time opening a protocol. For e.g., for magnet links:

image

@dasforsyth
Copy link

@bsclifton Thanks for mentioning, searching via Google didn't contain these pages. THis is because they do not mention ExternalProtocolDialogShowAlwaysOpenCheckbox . Based on your comment the following registry file should allow to restore the checkbox again.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\BraveSoftware\Brave]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:41000000

I found the above didn't work for me, but the below did:


[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\BraveSoftware\Brave]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:1

@kmf
Copy link

kmf commented May 16, 2020

For MacOS
defaults write com.brave.Browser ExternalProtocolDialogShowAlwaysOpenCheckbox -bool true

@apennismightier
Copy link

apennismightier commented Jul 8, 2020

@BryanChung you'd have to create the registry structure for them to show up
As shared above, you can make a new file called brave.reg (or similar) and put the following in there:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\BraveSoftware\Brave]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:1

After saving that, you can double click the .reg file and it'll add the entry. Let us know if that solves the issue for you smile

Oh! I needed to create one rather than finding it. Haha! Ok thanks!
@BryanChung @bsclifton

That directory doesn't exist in either the HKEY_LOCAL_MACHINE or the HKEY_CURRENT_USER for me. I'm on:

Version 1.10.97 Chromium: 83.0.4103.116 (Official Build) (64-bit)
Windows 8.1

@BryanChung
Copy link

@BryanChung you'd have to create the registry structure for them to show up
As shared above, you can make a new file called brave.reg (or similar) and put the following in there:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\BraveSoftware\Brave]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:1

After saving that, you can double click the .reg file and it'll add the entry. Let us know if that solves the issue for you smile

Oh! I needed to create one rather than finding it. Haha! Ok thanks!
@BryanChung @bsclifton

That directory doesn't exist in either the HKEY_LOCAL_MACHINE or the HKEY_CURRENT_USER for me. I'm on:

Version 1.10.97 Chromium: 83.0.4103.116 (Official Build) (64-bit)
Windows 8.1

Yeah we need to create the directory. :) You can use mine.

brave.zip

Don't blame me if it breaks. :P

@srirambv srirambv changed the title Provide option to "always" open files with system default or provide "do not ask again" option [Desktop] Provide option to "always" open files with system default or provide "do not ask again" option Sep 9, 2020
@xodotLBO
Copy link

@BryanChung you'd have to create the registry structure for them to show up
As shared above, you can make a new file called brave.reg (or similar) and put the following in there:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\BraveSoftware\Brave]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:1

After saving that, you can double click the .reg file and it'll add the entry. Let us know if that solves the issue for you smile

Oh! I needed to create one rather than finding it. Haha! Ok thanks!
@BryanChung @bsclifton

That directory doesn't exist in either the HKEY_LOCAL_MACHINE or the HKEY_CURRENT_USER for me. I'm on:
Version 1.10.97 Chromium: 83.0.4103.116 (Official Build) (64-bit)
Windows 8.1

Yeah we need to create the directory. :) You can use mine.

brave.zip

Don't blame me if it breaks. :P

Doesn't work for me.

@Xan-Kun
Copy link

Xan-Kun commented Sep 14, 2020

That directory doesn't exist in either the HKEY_LOCAL_MACHINE or the HKEY_CURRENT_USER for me. I'm on:

Version 1.10.97 Chromium: 83.0.4103.116 (Official Build) (64-bit)
Windows 8.1

@apennismightier Yeah, that's why it would have been so important for everybody to post their exact OS :-/ The paths are different, obviously.

Thanks for leading with a good example! :-)

@Bargsteen
Copy link

The current solution posted here only works on a per-site basis. It would be great if you could remove the prompt for a specific app for all sites.
Context: I am using Org Capture in Emacs to save bookmarks to a file on disk. This is a reasonably common use case for Emacs users :)

@aspiers
Copy link

aspiers commented Oct 29, 2020

@Bargsteen I have posted a solution for exactly that here :-)

@4evermaat
Copy link

4evermaat commented Nov 28, 2020

I don't understand why this is an "issue" that hasn't been resolved with brave

Snag_240e610d

A lot of brave versions have come out since this was first reported. Where is the checkbox that can store the user's preference? [I prefer to save the .torrent file]

Realistically, how hard is this to implement?

@LanceHaverkamp
Copy link

LanceHaverkamp commented Feb 9, 2021

This also affects mailto, which is used by far more people than use torrents.

@J-Wick4
Copy link

J-Wick4 commented Feb 17, 2021

I can see this for the first time used for a 3rd party extension, but after that, it should never happen again.

@jtoy
Copy link

jtoy commented Jul 4, 2021

+1

1 similar comment
@cprance
Copy link

cprance commented Jul 22, 2021

+1

@alik604
Copy link

alik604 commented Jun 28, 2022

id much rather use my qBittorrent which is linked to my VPN interface/adaptor. This is a liability, maybe even malware as it carries a risk of getting me a fine if I act carelessly.

Settings --> Extensions does not have webtorrent, its been moved to Settings - just use the search function. I was able to auto use my default client, qBittorrent. problem solved for me - on windows 10

@Xan-Kun
Copy link

Xan-Kun commented Jul 1, 2022

Good bye Brave. This is as long as I was willing to wait.

@aspiers
Copy link

aspiers commented Jul 2, 2022

@Xan-Kun commented on July 1, 2022 3:03 PM:

Good bye Brave. This is as long as I was willing to wait.

What are you waiting for exactly? There are workarounds posted in this issue.

@J-Wick4
Copy link

J-Wick4 commented Jul 2, 2022

@Xan-Kun commented on July 1, 2022 3:03 PM:

Good bye Brave. This is as long as I was willing to wait.

What are you waiting for exactly? There are workarounds posted in this issue.

Certain extensions constantly request permission to open a 3rd party app for each domain. It's totally annoying and needs to be adjusted to allow global permissions for all domains after permission is granted the first time.
Screen Shot 2022-07-02 at 6 05 19 PM

@aspiers
Copy link

aspiers commented Jul 2, 2022

The solution for that above has worked great for me for several months on Brave / Chrome / Chromium.

@kerim
Copy link

kerim commented Jul 22, 2022

I'm having this problem as well (and don't really understand the solution linked above). Why can't I just permit opening an app across ALL websites once and never have to think about it again?

@benesjan
Copy link

Why has this not been solved yet without having to hack around? Who wants to use shitty web apps when you have fast native ones which are actually integrated with the OS?

@kj4ezj
Copy link

kj4ezj commented Oct 11, 2022

+1

I have a unique use case for which I have yet to find a workaround.

Problem

I have to use Zoom video conferencing on my personal computer (Linux Mint) for work, school, and sometimes even family. Zoom has shown the world that it is not safe to run their native client on your computer[1, 2, 3, 4] because of negligence or malice, so I use it exclusively in a web browser. Video conferencing tends to "just work" in Chromium-family browsers, so I use Brave for Zoom.

When you open a meeting link, it tries to invoke their native app whether you have it or not.

2022-10-11 18-21-51 - Brave Zoom prompt with missing link

You may notice the Join from Your Browser link is missing. This doesn't always happen, but it usually does. So, once I click Cancel on the Open xdg-open prompt from Brave, I have to click Launch Meeting, and deal with the prompt again!

2022-10-11 18-22-32 - Brave Zoom second prompt

Once Zoom has prompted my browser twice, it will always show the Join from Your Browser option.

As upset as your community members are for having to deal with this prompt once multiple times every single day, imagine how excited I am to have to deal with it TWICE multiple times every singe day. :)

Solution What I Tried

I spent a few hours on this, read a bunch, and tried a number of things. Ultimately I found this Stack Overflow answer, this article for macOS that gave me the protocol URI Zoom uses, and this Stack Exchange answer @aspiers shared earlier in this thread which pointed me in the right direction to figure out where these policies live on Linux these days, because they have moved around.

The closest I got to a working solution was this.

sudo mkdir -p /etc/brave/policies/managed
jq -n '.URLBlocklist=["zoommtg:*","zoommtg://*"]' | sudo tee /etc/brave/policies/managed/blocklist.json

I also threw in the policy to force the "Always allow" checkbox to appear, even though Zoom already has it, for good measure.

sudo mkdir -p /etc/brave/policies/managed
jq -n '.ExternalProtocolDialogShowAlwaysOpenCheckbox=true' | sudo tee /etc/brave/policies/managed/protocol_open.json

These policies were picked up by Brave!

2022-10-11 18-23-32 - Brave Zoom policies

Unfortunately, instead of blocking the Zoom website from invoking the xdg-open dialogue box for zoommtg://* URIs and letting me use the browser, it prevented the page from loading entirely.

2022-10-11 18-23-57 - Brave Zoom blocked

I guess the prompts are technically gone, but this did not solve my problem so I reverted the blocklist.

System

System

Kernel: 5.4.0-126-generic x86_64 bits: 64 compiler: gcc v: 9.4.0 
Desktop: Cinnamon 5.2.7 wm: muffin dm: LightDM Distro: Linux Mint 20.3 Una 
base: Ubuntu 20.04 focal

Brave

Version 1.44.108 Chromium 106.0.5249.103 (Official Build) (64-bit)

Please add some mechanism to block specific sites from invoking this pop-up, or automatically deny it. If you read the original issue, OP asked for two things (admittedly with an "or") and there is a workaround for some use-cases to accomplish one of them, but a lot of people asking for the other with no workarounds I could find. I don't care if it is a checkbox, button, policy, flag, or a seance I conduct by putting candles and salt in a pattern around my computer under a full moon...but we need something.

I am not able to PR a fix myself without a ton of hand-holding, but I can help test solutions and open to other ideas from the community. Thank you for your time and product, I'll be a Brave user five years this December!

@asheroto
Copy link

Possible duplicate of:

#16927
#26058

@rebron rebron added this to General May 28, 2024
@rebron rebron moved this to P4 Backlog in General May 28, 2024
@wiesl
Copy link

wiesl commented Aug 11, 2024

Doesn't work for me with Brave Version 1.68.137 Chromium: 127.0.6533.100 (Official Build) (64-bit) on Windows 10.

I'm using the following extension with assigned hot key: Share link via email
https://chromewebstore.google.com/detail/share-link-via-email/ejdbkikfbnnhmachnnomjfgjbgkcnjkb

But I'm still getting the following popup (even with registry entries below and checking the always allow option):
chrome-extension://ejdbkikfbnnhmachnnomjfgjbgkcnjkb wants to open this application.
[ ] Always allow chrome-extension://ejdbkikfbnnhmachnnomjfgjbgkcnjkb to open links of this type in the associated app

Any ideas?

Thnx.

REGEDIT4

[HKEY_CURRENT_USER\Software\Policies\BraveSoftware\Brave]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:00000001

[HKEY_CURRENT_USER\SOFTWARE\BraveSoftware\Brave-Browser]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:00000001

@asheroto
Copy link

ejdbkikfbnnhmachnnomjfgjbgkcnjkb looks to be Share link via email, right? If you disable that extension do you still have the same issue?

Just trying to help isolate the problem. 😊

@wiesl
Copy link

wiesl commented Aug 12, 2024

Yes, as I wrote this is Share link via email.

So I configured the extension with an assigned hotkey (in my case Ctrl-Y).

Testcase:
1.) Press Ctrl-Y on a webpage (should just open the default E-Mail program with the link in an email)
2.) Getting the following popup
chrome-extension://ejdbkikfbnnhmachnnomjfgjbgkcnjkb wants to open this application.
[ ] Always allow chrome-extension://ejdbkikfbnnhmachnnomjfgjbgkcnjkb to open links of this type in the associated app
Buttons: Button 1: Open Mozilla Thunderbird, Portable Edition, Button 2: Cancel
3.) I press Open Mozilla Thunderbird, Portable Edition and the E-Mail will be opened.
(Checking "Always allow chrome-extension://ejdbkikfbnnhmachnnomjfgjbgkcnjkb to open links of this type in the associated app" doesn't have any effect)

Step 2 and 3 are the problem, shouldn't appear.

Should be easy to be reproduceable.

Doesn't appear in any other context. So disabling will not have any effect as I can't test it then 😊

BTW: In Chrome 127.* this topic doesn't exist.

@asheroto
Copy link

@wiesl sorry, my fault, I misread your post.

I am also experiencing a similar issue. The original post was made almost 5 years ago. 😊 I posted about this a year ago as well.

The developers must be busy with other things, I guess.


The OP mentioned qBittorrent but that is when the magnet: link is used. You can fix this by creating a registry key in the URLAllowList

Brave reads Chrome registry keys as well, so I tried this:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Google\Chrome\URLAllowList]
"1"="mailto://*"
"2"="tel://*"
"3"="magnet://*"

And reloaded Brave with brave://restart then tel: hyperlinks launch the application directly and well as magnet: hyperlinks, but mailto: hyperlinks continue to show the popup.

It seems that the issue seems to stem from the browser not properly recognizing the protocol_handler -> allowed_origin_protocol_pairs key in the Preferences file. Although selecting the "Always allow" checkbox does add the entry to this key, the browser is not actually processing it correctly. I'm not sure though, just a strong guess.

I've also tried this fix but it did not work.

@TheOverpassArsonist
Copy link

It's not the part that's getting the most attention here, but I'd also specifically want to mention the "Ask which app brave should use for torrents" option would also fix some really annoying problems. For some reason stremio got set as my default torrent client or something and now no matter what I try brave keeps trying to open magnet links in stremio as opposed to an actual torrent client and, since magnet links aren't actual files, I can't find anyway to change this association on an OS level. (Linux if relevant)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design A design change, especially one which needs input from the design team feature-request needs-investigation A bug not 100% confirmed/fixed OS/Desktop priority/P4 Planned work. We expect to get to it "soon".
Projects
Status: P4 Backlog
Development

No branches or pull requests