Linux: Firefox Browser Add BitTorrent Magnet Links Support

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:

ADVERTISEMENTS

Tutorial details
DifficultyEasy (rss)
Root privilegesNo
RequirementsFirefox v3.x+
Time5m

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
  • See firefox man page for more information
  • Transmission bittorrent client runs natively on multiple operating systems.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
21 comments… add one
  • raravun Sep 16, 2012 @ 11:40

    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;

    • james woods Jun 23, 2014 @ 20:22

      yeah its two years later and I still found this post to be helpful

  • Marek Nov 3, 2012 @ 12:34

    Thank you very much for this! It works perfectly on my Firefox 16 on Kubuntu 12.04!

    Thank you for sharing!

  • lish Nov 27, 2012 @ 7:19

    thanks a lot, this worked perfectly! so much easier than all the other crap i thought i’d have to do to get magnet links going.

  • Jorge Albán Jan 17, 2013 @ 4:55

    Well it did work great in Iceweasel 14.0.1, preinstalled in AVLinux 6.0 (2012)… Thanks a lot !

  • Dude Mar 10, 2013 @ 22:14

    it worked, thanks.

    To raravun, it didnt work for you so bug off.

  • Jason Jul 7, 2013 @ 19:54

    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…

  • carla Jul 27, 2013 @ 19:06

    Thanks a lot!! :)

  • Gordon Aug 17, 2013 @ 13:11

    Thank you for this tutorial. It worked for me using Transmission 2.77 and Firefox 22 in Linux Mint 15 KDE.

  • John Sep 3, 2013 @ 4:13

    This worked perfectly for me, thanks so much!

    Mint 15

  • Timao Sep 7, 2013 @ 21:44

    Hey Man,
    Thanks very much. It solved my problem perfectly!
    Reguards from Brazil

  • Randy Dec 5, 2013 @ 2:25

    Great! Very Helpful for what I needed!!!

  • ras Dec 21, 2013 @ 23:54

    Thank you very very much sir it worked perfectly. This is exactly what I was looking for!

  • thomas Mar 3, 2014 @ 21:13

    Tanks!

  • Andrew Apr 5, 2014 @ 3:01

    Thanks very much.
    Simple and works.

    Ubuntu 12.04

  • Alpino Jun 17, 2014 @ 13:43

    It worked. Thank you so much. Ubuntu 12.04 lts

  • fox Aug 30, 2014 @ 18:46

    thanks, worked great on Arch with Firefox 33 Aurora

  • Speezy Oct 3, 2014 @ 17:07

    Worked perfectly. Thanks for the tutorial

  • fast-fox Oct 13, 2014 @ 19:58

    Thanks a lot. worked great on Firefox 32

  • Emmanuel Nov 30, 2014 @ 6:11

    Pls how do I do this on windows computer? thank you

  • buhal Jul 30, 2016 @ 21:10

    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 Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.