How to reassign default client magnet links in Linux

Reassign default app for Magnet links on Linux

On some operating systems, when you install software that can open files with a certain extension, they change the preferences and set themselves as the default client. This would be fine if it was always what we want, but it is not. For example, in Linux we have video players that are compatible with the magnet links, and once the player is installed, it changes the properties of the link and always tries to open them with the same one.

Magnet links are similar to mailto or tel: if we have an application configured by default to open mail or call by phone, clicking or touching them will open it directly. In the case of Magnet and others, what comes into play is xdg-open, which is the software that is responsible for redirecting the link to the application if we are in a Chromium based browser. In Firefox you can decide what opens what, but in browsers based on the Google engine we have to do it differently.

Magnet links are used on the Torrent network

Changing it on Linux is relatively easy. We have to open a terminal and write the following:

xdg-mime query default x-scheme-handler/magnet gio mime x-scheme-handler/magnet xdg-mime default org.qbittorrent.qBittorrent.desktop x-scheme-handler/magnet

From the above, the first command will tell us which application is currently managing the Magnet links, with the second we will see all the compatible options and with the third we will reassign the management.

Port

Keep in mind that in the third command you have to put exactly what appears in the second, in my case org.kde.ktorrent.desktop for Ktorrent. If no other option appears, it is precisely because I made the change and uninstalled the player that had "stolen" these links from me because I never used it.

For those of us who are not users of a Chromium-based browser, things are simpler, or at least in Firefox. Making the switch is as simple as going to settings, searching for “Applications”, clicking on “magnet”, pulling down the menu on the right and choosing an application.

Choose app for magnets in Firefox2


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Mario said

    Very interesting, it is the type of articles that I like for the day to day on my laptop with linux.
    I had been "suffering" from magnet links with qbittorrent and this saved the day at least in that aspect
    Thank you