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: 9 Average: 4.4]

10 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

  • Unknown
    3 weeks ago

    Thanks Bill

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

    • Xiao Guo An (Admin)
      6 months ago

      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.

  • Henrique
    5 years ago

    Worked for me but I had to change qbittorrent.desktop to org.qbittorrent.qBittorrent.desktop and reinstall my qbittorrent.

    • reinstalling and change qbittorrent.desktop to org.qbittorrent.qBittorrent.desktop worked for me

  • Suo Marte
    4 years ago

    It only work for me in Ubuntu 18.04.4 when I tried to copy the correct command line:
    gio mime x-scheme-handler/magnet org.qbittorrent.qBittorrent.desktop

    suomarte@JuneCanyon:~$ gio mime x-scheme-handler/magnet org.qbittorrent.qBittorrent.desktop
    Set org.qbittorrent.qBittorrent.desktop as the default for x-scheme-handler/magnet
    suomarte@JuneCanyon:~$ 
    

    I got the idea when Henrique posted his comment that he had to change the “qbittorrent.desktop” into “org.qbittorrent.qBittorrent.desktop.” Anyway, I must thank Linuxbabe for an interactive post from Linux users who gave their valuable comments.

  • slot gacor
    2 years ago

    I am regular reader, how are you everybody? This post posted at this web site is actually
    good.

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.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here