Ubuntu – Make WebTorrent handle magnet links

bittorrenttransmission

I seem to have forgotten how to make WebTorrent, or any torrent application automatically grab the magnet torrent links from websites like thepiratebay.org?

There's no file to download so I cannot choose the prefered application, and it's being opened my the Ubuntu's default – Transmission.

Help?

Best Answer

  • Desktop default or any tool using xdg-open directly (including Chrome/Chromium). To check the current default use:

    ~$ xdg-mime query default x-scheme-handler/magnet
    transmission-gtk.desktop
    

    To check available tools:

    ~$ grep -r -e "application/x-bittorrent" -e "x-scheme-handler/magnet" /usr/share/applications/
    /usr/share/applications/deluge.desktop:MimeType=application/x-bittorrent;x-scheme-handler/magnet;
    /usr/share/applications/transmission-gtk.desktop:MimeType=application/x-bittorrent;x-scheme-handler/magnet;
    /usr/share/applications/mimeinfo.cache:application/x-bittorrent=transmission-gtk.desktop;deluge.desktop;
    /usr/share/applications/mimeinfo.cache:x-scheme-handler/magnet=transmission-gtk.desktop;deluge.desktop;
    

    To set another tool, for example Deluge:

    xdg-mime default deluge.desktop x-scheme-handler/magnet
    
  • Firefox lets you choose which application handles each type of link (URL):

    Firefox menu → Preferences → Applications → magnet: Choose Use other.

    Firefox: setting magnet handler