Choose style:

Author Topic: Torrent Magnetic Links  (Read 7818 times)

0 Members and 1 Guest are viewing this topic.

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4893
  • Karma: 1053
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Torrent Magnetic Links
« on: June 05, 2015, 02:45:47 am »
Is there a way of using Torrent Magnetic Links with either Transmission or Deluge.  I've never been able to get them to work with Linux.  Just asking because more and more torrent sites are dropping standard torrent downloads in favour of magnetic links.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline emegra

  • Administrator
  • Veteran
  • *****
  • Posts: 1946
  • Karma: 446
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 10 64bit
Re: Torrent Magnetic Links
« Reply #1 on: June 05, 2015, 03:24:48 am »
HI Andy

Quote
Is there a way of using Torrent Magnetic Links with either Transmission or Deluge

I've never got it working either with Transmission, I still have to copy the link location and paste in the URL

It's not a big inconvenience but it would be nice if Magnets worked


Graeme
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Torrent Magnetic Links
« Reply #2 on: June 05, 2015, 03:30:49 am »
They work directly in Firefox :)

IIRC there was a convoluted fix for Chrome/Chromium on the old forum somewhere .. just gotta try find it and test it still works.

One of the MANY reasons I prefer Firefox .. stuff "just works" in Firefox.
« Last Edit: June 05, 2015, 03:32:52 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline emegra

  • Administrator
  • Veteran
  • *****
  • Posts: 1946
  • Karma: 446
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 10 64bit
Re: Torrent Magnetic Links
« Reply #3 on: June 05, 2015, 03:33:09 am »
According to this http://www.transmissionbt.com/ v2.84 now works with Magnets

The current version is 2.82 (in the repos) so it's quite possible 2.84 will work with Magnets might be worth downloading it and giving it a try



Graeme
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Torrent Magnetic Links
« Reply #4 on: June 05, 2015, 03:36:45 am »
It's NOT a problem with Transmission .. it's a problem with the way Chrome/Chromium handles magnet links.
« Last Edit: June 05, 2015, 03:40:02 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline emegra

  • Administrator
  • Veteran
  • *****
  • Posts: 1946
  • Karma: 446
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 10 64bit
Re: Torrent Magnetic Links
« Reply #5 on: June 05, 2015, 03:39:17 am »
Quote
It's NOT a problem with Transmission .. it's a problem with the way Chrome/Chromium handles magnet links.

So presumably Transmission is using Chromium to to download torrents is that right ?



Graeme
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Torrent Magnetic Links
« Reply #6 on: June 05, 2015, 03:48:10 am »
OK, in Firefox you can choose which application is opened by certain types of links .. this is built into Firefox, and by default it chooses whatever torrent application you have on your PC.

Chromium on the other hand seems to rely on some system file (xdg-open IIRC) to decide what to do with them .. and for some reason that was broken in LXDE .. I can't remember the exact problem, I'll try digging through the old site in a bit.

but it's not Transmission choosing the browser .. it's the browser that's *supposed* to choose Transmission

You click the link in your web browser, which then needs to know what application to start and how to pass the link to it .. Firefox knows how to do this, Chromium doesn't (and needs a "dirty fix" to be able to open Transmission).
« Last Edit: June 05, 2015, 04:44:18 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Torrent Magnetic Links
« Reply #7 on: June 05, 2015, 04:42:40 am »
This fix is for Chromium/Chrome and shouldn't be necessary in Firefox

OK, run:
Code: [Select]
sudo gedit /usr/share/applications/defaults.list
and add a NEW line at the bottom that reads:-
Code: [Select]
x-scheme-handler/magnet=transmission-gtk.desktop
SAVE the file and exit gedit.

Back in the terminal run:
Code: [Select]
sudo cp -v /usr/bin/xdg-open /usr/bin/xdg-open.bak
OK, open xdg-open for editing:
Code: [Select]
sudo gedit /usr/bin/xdg-open
look for the section (starts around line 300) that reads:-
Code: [Select]
#--------------------------------------
# Checks for known desktop environments
# set variable DE to the desktop environments name, lowercase

detectDE()
{
    if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
    elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
    elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
    elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
    elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
    else DE=""
    fi
}

#----------------------------------------------------------------------------
and change it to:-
Code: [Select]
#--------------------------------------
# Checks for known desktop environments
# set variable DE to the desktop environments name, lowercase

detectDE()
{
    if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
    elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
    elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
    elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
    elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
    elif [ x"$DESKTOP_SESSION" = x"Peppermint" ]; then DE=gnome;
    else DE=""
    fi
}

#----------------------------------------------------------------------------
SAVE the file.

Test Magnet links in Chromium/Chrome.

When Chromium/Chrome displays a dialog saying it wants to open the link with xdg-open, say OK

if that then opens Transmission, the next time you use a magnet link and it presents you with that dialog .. tick the box to remember it before clicking OK
« Last Edit: June 05, 2015, 05:15:17 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline emegra

  • Administrator
  • Veteran
  • *****
  • Posts: 1946
  • Karma: 446
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 10 64bit
Re: Torrent Magnetic Links
« Reply #8 on: June 05, 2015, 04:44:03 am »
ok the reason I'm asking is this

I'm probably completely misunderstanding how this works so please bear with me but to download torrents I use a Transmission plugin in my Openmediavault NAS which doesn't have a web browser

OK forget the above I see it now I'm still using the PC's web browser to download the link but I'm sure it still doesn't work even with Firefox, is there anything I have to do in Firefox or should it work out of the box ?



Graeme
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Torrent Magnetic Links
« Reply #9 on: June 05, 2015, 04:55:59 am »
In Firefox, go to
Edit > Preferences > Applications

Somewhere in the list of applications you should have

magnet          Use Bittorrent Client (default)

if it's set to "Always Ask" .. click on "Always Ask" and change it to "Use Bittorrent Client (default)"

[EDIT]

If that still doesn't work, let me know and I'll tell you how to make Firefox the default web browser.
« Last Edit: June 05, 2015, 05:16:42 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4893
  • Karma: 1053
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: Torrent Magnetic Links
« Reply #10 on: June 05, 2015, 12:49:08 pm »
That's great.  Chrome is now using Transmission for magnetic downloads - thanks  a bunch.  @scifidude: Yeah, if you can dig up a solution for Deluge.  That would be great.  I've always used Deluge in the past.  I'm trying to stick with Transmission for PM6.  A Deluge solution would be great to add to my bookmarks  ;).
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline scifidude79

  • Global Moderator
  • Hero
  • *****
  • Posts: 4029
  • Karma: 865
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Torrent Magnetic Links
« Reply #11 on: June 05, 2015, 12:57:24 pm »
@scifidude: Yeah, if you can dig up a solution for Deluge.  That would be great.  I've always used Deluge in the past.  I'm trying to stick with Transmission for PM6.  A Deluge solution would be great to add to my bookmarks  ;).

Oops, I deleted that post because I realized I hadn't gotten them working in the past.  :-[

HOWEVER, I can still check it out, assuming I can find a site that has a magnet to try.  I already installed Deluge.

Offline scifidude79

  • Global Moderator
  • Hero
  • *****
  • Posts: 4029
  • Karma: 865
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Torrent Magnetic Links
« Reply #12 on: June 05, 2015, 02:00:59 pm »
Yes, I got it working with Deluge.  First, you have to install the deluge-webui package.  Then you have to set Deluge as the default handler for magnet links.  I did this in the program and also under the Default Applications for LXSession GUI tool, just to be certain.  After that, set up magnet links in your browser and it works.

By the way, that last bit was fun for Chrome.  It involved modifying a text file with root privileges.  I found a solution for this here:

http://askubuntu.com/questions/311537/torrent-magnet-links-open-new-window-but-not-transmission

Top answer with the green check next to it.  I modified the file as indicated but, of course, I changed the desktop environment from Lubuntu to Peppermint and the program from Transmission-gtk to Deluge-gtk.  Though, the good thing is, that shows you how to get it working with Transmission.  :D

And, lastly, I found a magnet link (DO NOT ask where) to test it and it works.

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Torrent Magnetic Links
« Reply #13 on: June 05, 2015, 03:02:25 pm »
As long as deluge is installed and working properly, all you should need to do is use my instructions for transmission (above), but instead of adding this line:
Code: [Select]
x-scheme-handler/magnet=transmission-gtk.desktop
to defaults.list

add this one instead:
Code: [Select]
x-scheme-handler/magnet=deluge.desktop
« Last Edit: June 05, 2015, 03:13:24 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline scifidude79

  • Global Moderator
  • Hero
  • *****
  • Posts: 4029
  • Karma: 865
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Torrent Magnetic Links
« Reply #14 on: June 05, 2015, 03:18:39 pm »
As long as deluge is installed and working properly, all you should need to do is use my instructions for transmission (above), but instead of adding this line:
Code: [Select]
x-scheme-handler/magnet=transmission-gtk.desktop
to defaults.list

add this one instead:
Code: [Select]
x-scheme-handler/magnet=deluge.desktop

Yeah, I'm sure both work.  However, that's the solution I found.  ;)