9

(i'm on latest chrome beta (64) but it is happening in all the previous version of chrome i used.)

when i press magnet links in google chrome, i get this card: Open xdg-open?

so i mark to always open these types of links... and then press open xdg-open. now qBittorrent is starting to work. everything is OK.

but, if i press another magnet link, it again pop up this card and ask me what to do. it always do that and never save what i choose for later.

i have qbittorrent.desktop in /usr/share/applications

the beginning of qbittorrent.desktop is:

[Desktop Entry]                                           
Categories=Network;FileTransfer;P2P;Qt;                   
Exec=qbittorrent %U                                       
GenericName=BitTorrent client                             
Comment=Download and share files over BitTorrent          
Icon=qbittorrent                                          
MimeType=application/x-bittorrent;x-scheme-handler/magnet;
Name=qBittorrent                                          
Terminal=false                                            
Type=Application                                          
StartupNotify=false                                       
StartupWMClass=qbittorrent                                
Keywords=bittorrent;torrent;magnet;download;p2p;          

also in ~/.config/mimeapps.list i have this:

[Default Applications]                             
text/html=google-chrome-beta.desktop               
x-scheme-handler/http=google-chrome-beta.desktop   
x-scheme-handler/https=google-chrome-beta.desktop  
x-scheme-handler/about=google-chrome-beta.desktop  
x-scheme-handler/unknown=google-chrome-beta.desktop
x-scheme-handler/magnet=qbittorrent.desktop        

if i command xdg-mime query default x-scheme-handler/magnet i get qbittorrent.desktop result.

also if i command: xdg-mime default qbittorrent.desktop x-scheme-handler/magnet nothing is changed and problem exist.

last thing, if i open terminal and command:

xdg-open magnet:?xt=magnet-link-continue-here it opens qbittorrent with the link without a problem.

Azriel
  • 211
  • 1
  • 2
  • 6

2 Answers2

2

it was a bug in chrome:
https://bugs.chromium.org/p/chromium/issues/detail?id=788431
fixed now on latest chrome beta (maybe on stable also).

Azriel
  • 211
  • 1
  • 2
  • 6
  • 1
    Broken again? This bug and its numerous duplicates suggests so: https://bugs.launchpad.net/snapd/+bug/1776873 Certainly under Ubuntu 19.10 I can't open anything from the browser anymore. – CPBL Feb 17 '20 at 13:08
  • keeps prompting on debian testing tool frustrating. – RichieHH Feb 17 '20 at 21:20
  • This worked for me. https://community.shotgunsoftware.com/t/how-to-fix-chrome-protocol-handler-always-open-these-types-of-links-pop-up-when-opening-rv-through-rvlink/4306 – Alfredo Diaz Mar 18 '20 at 06:28
  • @AlfredoDiaz This didn't work for me. Chrome 81.0.4044.92 on Ubuntu 19.10. Still cannit select auto open / always open, etc and need to manually click it each time. – jetole Apr 10 '20 at 11:08
2

This solution works for me on Google Chrome 84.0.4147.89, for specific types of xdg links. For example, if the link in question is magnet://someurl, you can use:

sudo mkdir -p /etc/opt/chrome/policies/managed/ && echo '{ "URLWhitelist": ["magnet://*"] }' |sudo tee /etc/opt/chrome/policies/managed/whitelist.json
Peaker
  • 121
  • 2