How to Change the Default Torrent Program on Linux (Ubuntu Gnome)

Sometimes you installed a new torrent client such as Deluge, or qBittorrent on your desktop Linux, but you don’t know how to set it as the default. Look no further! The following is everything you need to know about changing the default torrent program on a Linux distro that runs the Gnome desktop enviroment, including ubuntu, Fedora, Arch linux, etc.

Set the Default Program for Opening Torrent Files

To set the default program to open torrent files, open up your file manager, navigate to the directory that contains the downloaded torrent file. Right click the torrent file and select properties in the context menu.

change torrent program on Ubuntu

Then select Open With tab, from there you can set the default program to open torrent files.

set default torrent client ubuntu linux

Set the Default Program to Open Magnet URLs

If you followed the above steps, then when you double click a torrent file in your file manager, your desired torrent client will fire up. But when you click a magnet link in your Firefox or Google Chrome browser, your old torrent client will open up. We will use gio command line utility to alter the default program for magnet links.

First, run the following command to show the default program and alternative programs to open magnet links.

gio mime x-scheme-handler/magnet

As you can see, the default on my system is Transmission.

ubuntu change default torrent client magnet

To set Deluge as the default program for magnet links, run

gio mime x-scheme-handler/magnet deluge.desktop

To set qbittorent as the default program for magnet links, run

gio mime x-scheme-handler/magnet qbittorrent.desktop

Overriding System Default in Firefox

In Firefox browser, you can set the default program to open magnet links. This setting will override the system setting for magnet links.

In Firefox, go to Preferences -> General -> Applications, find the content type of magnet in the list and select the default program.

set transmission as default for magnet links

If you can’t find the magnet content type, then head over to your favourite torrent website in Firefox and click a magnet link on the website. Firefox will ask you to choose a torrent client to open the magnet URL. After you choose a torrent client, you should see the magnet content type in applications panel.

Transfer Unfinished Torrents

Here is a little trick you can use to transfer unfinished torrents from one torrent client to another, or from Linux distro to another distro.

Right click your unfinished torrent and select copy magnet link. Now your magnet link is in the clipboard, you can open it up in another torrent client. For instance, in Transmission, select File > Open URL to open the magnet link.

open url

Set the right download path and transmission will automatically verify downloaded data and continue to download remaining data.

If you have a dual boot setup, you can copy all your magnet links to a file. Then reboot your computer into another operating system. From there you can open your magnet links from your file, set the right download path and continue downloading from where

Rate this tutorial
[Total: 7 Average: 4.3]

report this ad

5 Responses to “How to Change the Default Torrent Program on Linux (Ubuntu Gnome)

  • In Ubuntu 18.04 I used the following:

    gio mime application/x-bittorrent qbittorrent.desktop
    gio mime x-scheme-handler/magnet qbittorrent.desktop

  • Thanks Bill

  • How should I write such a `.desktop` file? Can I use only `.desktop` files? So many questions left :/

    • Hi, the .desktop file has already been installed by your torrent program in /usr/share/applications/ directory. You don’t need to manually create it.

      • Unless I am writing the application, and therefore I also need to write the .desktop file 😉 For other users in this case, you can find extensive docs at https://specifications.freedesktop.org/desktop-entry-spec/latest/ or similar pages.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • If my answer helped you, please consider supporting this site. Thanks :)