Setting a protocol handler

Patrick O'Callaghan pocallaghan at gmail.com
Wed Mar 28 12:26:58 UTC 2012


On Wed, 2012-03-28 at 12:18 +0800, Ed Greshko wrote:
> On 03/28/2012 10:59 AM, Patrick O'Callaghan wrote:
> > As I said before, it's already there:
> >
> > $ grep magnet /usr/share/applications/qBittorrent.desktop
> > MimeType=application/x-bittorrent;x-scheme-handler/magnet;
> >
> > I had tried putting it in .config/autostart since QBT is an autostarted
> > program, that's all. Just for the heck of it, I also copied it
> > to .local/share/applications as you suggest. It made no difference.
> >
> > Still counting this as 'hard' (not least because I don't consider any of
> > the above suggestions as remotely obvious to the average user, even if
> > they did actually work).
> 
> I don't know if this will work....  I've not done it in a long time and not sure it
> has the desired effect...
> 
> How about going to "System Settings", "File Associations" and then going to
> Application/x-bittorrent and adding qBittorent into the "Application Preference
> Order" at the top?

Because I'm not trying to set a handler for BitTorrent. That part
already works. As I noted in my OP, the problem here is that magnet
links are not signalled by a special file extension or MIME type, just
by a magnet: protocol flag at the start of the URI. Here's an example of
one:

magnet:?xt=urn:btih:29b30e19144ee41266e40096ffa09714b6541103&dn= ... etc.

IOW it's analogous to http: or file: or email: but I can't get a clear
answer on the mechanics of how this is handled by KDE. Clearly something
in my KDE setup thinks that these things should be handled by Ktorrent,
but where is this stated and how do I change it? I repeat that no
Ktorrent .desktop file on my system even mentions magnet, so what's
going on?

poc



More information about the kde mailing list