Linux: Firefox Browser Add BitTorrent Magnet Links Support

Posted on in Categories , , last updated August 17, 2013

How do I add magnet links with transmission bittorrent in Firefox running under Linux operating systems?

You can easily add magnet protocol association in Mozilla Firefox browser for any bittorrent client. Transmission is a fast and easy BitTorrent client. From the wikipedia:

The Magnet URI scheme is a de facto standard (instead of an open standard) defining a URI scheme for Magnet links, which mainly refer to resources available for download via peer-to-peer networks. Such a link typically identifies a file not by location, but by content — more precisely, by the content’s cryptographic hash value.

How can I add magnet support to Firefox?

Open firefox. Type the following in address bar:
about:config
Sample outputs:

Fig.01: about:config settings
Fig.01: about:config settings

Click on “I’ll be careful, I promise!” button. Right click > New > Boolean (see fig.02):
Fig.02: Boolean settings
Fig.02: Boolean settings

You need to enter new boolean value called network.protocol-handler.expose.magnet and set it to false. This allows you to assign a bittorrent client for all magnet links. For example, when you open a magnet link you will be prompted with a Launch Application dialogue box. From there you can simply select transmission or any other torrent client.

Fig.03: Setting boolean value
Fig.03: Setting boolean value

How do I force Firefox to open all magnet links via transmission bittorrent client only?

Just click on a magnet link and Firefox will be forced to prompt you as follows:

Fig.04: Firefox launch application dialogue
Fig.04: Firefox launch application dialogue

You need to specify the full path as follows:
/usr/bin/transmission
Fig.05 Transmission - a bittorrent client in action
Fig.05 Transmission – a bittorrent client in action

Check out related media

This tutorial also available in video format:

(Video.01: Linux Add Magnet Link Support To Firefox For Torrent Client)

See also

21 comment

  1. What is the point of adding a tutorial for a version of firefox that is badly outdated?

    This method by no means will work on any linux distro that is is not 3 years old.
    Latest versions of firefox seem do not use network.protocol.handler* keys at all.

    To the people from the future:
    Right way to add new protocol handler is to edit either /usr/share/applications/mimeinfo.cache or edit the .desktop file of the application you want to be a handler for a specific resource.

    For example here is a relevant excerpt from /usr/share/applications/qBittorrent.desktop

    MimeType=application/x-bittorrent;x-scheme-handler/magnet;

  2. Thanks for this. I have used transmission before on Ubuntu and have not had the problem I had just now when I updated to 13.04. Got transmission to work now when I add torrents. Thanks for the info…

  3. This worked for me, FF 47, Debian 9, KDE 5:
    1. In about:config find “network.protocol-handler.expose-all”, change to “false”;
    2. Click on some magnet link – a file browser pop-up should appear, show it full path to the executable (/usr/bin/qbittorrent for ex.);
    3. Change “network.protocol-handler.expose-all” back to “true”;
    4. Download the world.

Leave a Comment