Hello i have a problem in Ubuntu Natty associating magnet links with Deluge. If i associate magnet links with some other client it works well, but when i try with Deluge they keep opening with the previous program i had associated.
In gconf-editor i saw that when i associate magnet links with the (others - associate magnet links with deluge) menu, the command it uses is deluge '%s', i tried changing it to deluge-gtk '%s' and doesn't work either.
If i type in a console deluge + some magnet link it opens with deluge without problem.
Someone have any idea in how to fix the problem?
I posted this problem in support but i think this comes here.
Problem with magnet links in Ubuntu Natty
Re: Problem with magnet links in Ubuntu Natty
Are you sure its not a problem with xdg-open as reported here: http://ubuntuforums.org/showthread.php?t=1747876
I have tried it with Firefox 4 magnet handler and works ok.
I have tried it with Firefox 4 magnet handler and works ok.
Re: Problem with magnet links in Ubuntu Natty
I don't know what the problem is, but it only happens with Deluge.
Re: Problem with magnet links in Ubuntu Natty
<re-post of my reply from the support forum>
Currently Ubuntu has a bug in the Deluge packaging.
You already found the keys in gconf-editor that are set to associate deluge with magnet links, but those keys only affect the behaviour of xdg-open.
As of Natty, it appears that the file-open functionality is instead handled by gvfs-open. To test, You can invoke gvfs-open directly on the command line and give it a magnet link as an argument.
gvfs-open doesn't use the gconf stuff, instead it examines the .desktop files bundled with each application to determine what file types can be handled.
The /usr/share/applications/deluge.desktop file has two separate problems in it, both of which must be fixed for deluge to start handling magnet links from your web browser.
The current "official" version of the file:
First problem:
This line should have "%U" added to the end, this string gets replaced with the url/filename for deluge to open when invoked.
Second problem:
This does not specify that deluge is capable of handling magnet links.
Corrected version:
If you are changing this by hand, then you need to run "update-desktop-database" after saving the corrected version of the file.
There is no bug for this in launchpad currently, I tried to create one this morning but couldn't figure out how.
Currently Ubuntu has a bug in the Deluge packaging.
You already found the keys in gconf-editor that are set to associate deluge with magnet links, but those keys only affect the behaviour of xdg-open.
As of Natty, it appears that the file-open functionality is instead handled by gvfs-open. To test, You can invoke gvfs-open directly on the command line and give it a magnet link as an argument.
gvfs-open doesn't use the gconf stuff, instead it examines the .desktop files bundled with each application to determine what file types can be handled.
The /usr/share/applications/deluge.desktop file has two separate problems in it, both of which must be fixed for deluge to start handling magnet links from your web browser.
The current "official" version of the file:
Code: Select all
Version=1.0
Name=Deluge BitTorrent Client
GenericName=Bittorrent Client
Comment=Transfer files using the Bittorrent protocol
Exec=deluge-gtk
Icon=deluge
Terminal=false
Type=Application
Categories=Network;
StartupNotify=true
MimeType=application/x-bittorrent;
Code: Select all
Exec=deluge-gtk
Second problem:
Code: Select all
MimeType=application/x-bittorrent;
Corrected version:
Code: Select all
Version=1.0
Name=Deluge BitTorrent Client
GenericName=Bittorrent Client
Comment=Transfer files using the Bittorrent protocol
Exec=deluge-gtk %U
Icon=deluge
Terminal=false
Type=Application
Categories=Network;
StartupNotify=true
MimeType=application/x-bittorrent;x-scheme-handler/magnet;
There is no bug for this in launchpad currently, I tried to create one this morning but couldn't figure out how.
Re: Problem with magnet links in Ubuntu Natty
For me, adding the following line to ~/.local/share/applications/mimeapps.list was also needed to get deluge running magnet links, instead of transmission:
Code: Select all
x-scheme-handler/magnet=deluge.desktop;