Using Chrome browser on openSUSE, although the Linux version/distro shouldn't matter for this particular little bit of trickery.
When you click a magnet or torrent link on a web page, Chrome will pop up with an xdg-open dialog box. The default (at least on openSUSE), is to use Transmission. But I wanted KTorrent.
Simply edit the /usr/share/applications/defaults.list file. You should see lines similar to:
Code:
application/x-bittorrent=transmission-gtk.desktop
---and----
x-scheme-handler/magnet=transmission-gtk.desktop
Change them to use kde4-ktorrent.desktop. Save the file, and your'e done. The next time xdg-open runs, it will run ktorrent, or whatever you'd put there. And note the "kde4-"...the .desktop file referenced is not in /usr/share/applications, but in /usr/share/applications
kde4...ktorrent.desktop is the file IN that directory.
Want to check and see if what you did worked? Run:
Code:
xdg-mime query default application/x-bittorrent
---and----
xdg-mime query default x-scheme-handler/magnet
..it should return "kde4-ktorrent.desktop".