I am trying to set the default application for magnet links using:

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

Checking this with grep -i deluge ~/.local/share/applications/* yeilds:


i.e. it should have worked right?!? c.f:

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

However when I run xdg-open magnet:?xt=urn:btih:6fa3fa92... chromium fires up!

I'm stumped.

  • What does xdg-mime query default x-scheme-handler/magnet return ? Nov 12, 2012 at 20:18
  • @don_crissti deluge.desktop
    – jsj
    Nov 13, 2012 at 5:00

2 Answers 2


I ended up using this patch for xdg-open, which just hardcodes deluge.

Hack central but does the job, and at least taught me that xdg-open is a script which I can play with.


For me, further to running the xdg-mime default <your file type> command, it was running

update-desktop-database ~/.local/share/applications/

which finally updated the default application.

After this, running xdg-mime query default <your file type> now showed the new default application.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .