2012-12-18

How to open magnet links with Vuze in Ubuntu

  1. Open terminal
  2. sudo gedit /usr/share/applications/azureus.desktop, change line "MimeType=application/x-bittorrent" to "MimeType=application/x-bittorrent;x-scheme-handler/magnet". Also change line "Exec=azureus %f" to "Exec=azureus %u".
  3. sudo gedit /usr/share/applications/defaults.list or just for one user sudo gedit ~/.local/share/applications/mimeapps.list and change or add line "x-scheme-handler/magnet=azureus.desktop".
XFCE users also need to do one additional step: sudo (your text editor) /usr/bin/xdg-open, and change this:

open_xfce()
         {
             exo-open "$1"
>
             if [ $? -eq 0 ]; then

                 exit_success
             else
                 exit_failure_operation_failed
             fi
         }

to this:

open_xfce()
        {
            if (echo "$1" | grep -q '^magnet:'); then
                azureus "$1"
            else
                exo-open "$1"
            fi

            if [ $? -eq 0 ]; then
                exit_success
            else
                exit_failure_operation_failed
            fi
        }

      *: After updating Vuze, azureus.desktop file resets to default, so change it again.
      **: This also works for other clients, you just need to change client's name.

      6 comments:

      1. Replies
        1. Anonymous9/12/13 08:09

          this didnt help in the slightest

          Delete
      2. This is exactly what I needed, thanks for the post.

        ReplyDelete
      3. This comment has been removed by the author.

        ReplyDelete
      4. Thank you, Ernestas! I'd tried several Firefox-centric suggestions, none of which worked, before coming across this solution, which makes a single magnet link click in Firefox open a torrent for downloading in Vuze - just as it does in Android and OS X.

        Ubuntu: 14.04
        Firefox: 40.0.3
        Vuze: 4.3.0.6/4 az3

        Note: I had to undo the Firefox-centric suggestions to get this solution to work:
        ● about:config > search on 'magnet' > for each user set magnet pref: right-chick, choose 'Reset'

        ReplyDelete
      5. perfect, thank you so much!

        ReplyDelete