How to open magnet links from firefox with deluge

How can I open magnet links with firefox? I tried setting following values in about:config,

network.protocol-handler.app.magnet -> /usr/bin/deluge
network.protocol-handler.expose.magnet -> true
network.protocol-handler.external.magnet -> true

But firefox keeps on complaining about

Firefox doesn't know how to open this address, because the protocol (magnet) isn't associated with any program.

I am using repository version of firefox (5) and deluge (1.3.1 - gui+daemon mode) on ubuntu 11.04

Edit: I was told to set network.protocol-handler.expose.magnet to false and firefox would ask which application to use, but I see no box asking me something appearing.


Solution 1:

as of firefox 3.6 network.protocol-handler.external.* seems to no longer work

in about:config

network.protocol-handler.expose.magnet -> false

and 'reset' all other values to do with magnet.

once you click a magnet link you will be prompted to choose an application, navigate to and select /usr/bin/deluge

You might also try

$ gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command 'deluge "%s"'
$ gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/needs_terminal false
$ gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true

Solution 2:

In Firefox go to Edit/Preferences/Applications, search magnet and set Deluge

enter image description here

Solution 3:

Instead of clicking on the magnet link in Firefox (which requires some advanced configuration to set up), right-click on the link and select "Copy Link Location". Then, move into your Deluge window, click Add Torrent (the "+" at the top-left of the window), and then click the "URL" button.

Happy torrenting, and remember to go for a 3:1 seed ratio!

Solution 4:

was trying to get magnets to open with deluge in chrome rather than firefox but after trying everything else i had seen i finally managed to make magnet links open in deluge by not only changing

MimeType=application/x-bittorrent;

to

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

in /usr/share/applications/deluge.desktop but also removing

x-scheme-handler/magnet;

from /usr/share/applications/transmission-gtk.desktop before running

sudo update-desktop-database

hope this helps anyone with similar problems