You Got A Question? Ask    GNOME Community!

gtk-theme2
 14229   |  Oct 25
 10368   |  Aug 25
gtk_logo2
 9802   |  Mar 17
arch
 8880   |  Mar 28

Handle Magnetic links in Chromium under GNOME

This post was made with an older stylesheet

Linux makes the perfect client for downloading movies, books, music, comics and whatever else from torrent networks without worrying about getting a virus. There are plenty of torrent programs for Linux and GNOME, and I personally  have Transmission and Deluge.

Normally I’m using kat to download files, but today I found something I was looking for in Pirate Bay. The problem was that I could only use the magnetic link (no torrent download), and my Chrome was opening Transmission when I wanted to download it with Deluge.

In Firefox you can set the mimetypes from the Preferences->Applications, something you can’t do in Chromium. So I had to change the mimetypes in GNOME which is easy anyway, but if you don’t know how to do it, this is an example for magnetic links.

First we need to find out where our mime files are (per user).

$ gedit ~/.local/share/applications/mimeapps.list

Notice the “.desktop” files. Since I want to use Deluge I need to find out Deluge.desktop

$ cd /usr/share/applications

and

$ ls deluge*
deluge.desktop

If we investigate on this

$ less deluge.desktop

We will find

MimeType=application/x-bittorrent;x-scheme-handler/magnet;

So we now basically know the handler we should use for setting our mimetype. When we open Magnetic with Chrome we see this “xgd-open”
xdg-open

What I want now is to set it to open my torrents with Deluge and not with Transmission which is the default option in my installation.

$ xdg-mime default deluge.desktop x-scheme-handler/magnet

That basically will add in your “/.local/share/applications/mimeapps.list” just a line. So you can manually doit without run the above command

$ gedit ~/.local/share/applications/mimeapps.list

and add

[Default Applications]
...
x-scheme-handler/magnet=deluge.desktop
...

That was a small hint in mimetypes.

gcc-default
GNOME could use some more options here -I guess :)


 
  We can't watch comments unless G+ provides an API or if you send a notification, e.g +World Of Gnome
     Sometimes is better to place your questions on GNOME Community
  • Khurshid Alam

    I wish I could open irc:// link in empathy. But empathy doesn’t have any url-handler (yet). However I can do it in pidgin. http://goo.gl/IeTX4