How do I get magnet links to be opened using qBittorrent instead of transmission?

Hi, folks

People on this forum I have found quite helpful so I have yet another query that I have attempted to solve myself, but failed. Since I installed Transmission I have found that magnet links are opened with it by default, before this they were opened using qBittorrent. I ran:

xdg-mime default qBittorrent.desktop x-scheme-handler/magnet

in an attempt to fix this problem, but it hasn’t. Just to check that I ran this correctly, I ran:

xdg-mime query default x-scheme-handler/magnet

which returned:


as I thought.

I checked that I got the .desktop file’s name correct by running:

find /usr/share/applications -name "q*torrent.desktop"

and this returned:


so I knew the desktop file’s name was qBittorrent.desktop and not qbittorrent.desktop or some other minor variant.

Thanks for your time,

Why don’t you set it in Firefox (or other browser) Preferences.
Go to >Preferences then to >Applications and in “magnet” set your desired client.

In my case when I click magnet, Firefox always asks me what to do and I can chose my torrent client.

I use Google Chrome, I’ve searched its settings for how it opens magnet links and I can’t seem to find such an option.

I don’t use Google Chrome, but quick search tells me it’s here -
I suspect it should be in >Handlers