Page 1 of 2

Can't open magnet links with chromium 59

Posted: Thu 29 Jun 2017, 11:30
by jss83
I am using Chromium 59 but I can't seem to get magnet links to open transmission, when I click on a magnet link, a pop up appears (link attached) but whatever I click, nothing happens, What to do?

Posted: Thu 29 Jun 2017, 17:22
by ally
open transmission, right click above menu and 'layer above'

drag magnetic link into transmission window

:)

Posted: Thu 29 Jun 2017, 17:28
by jss83
:D Nice workaround. Though this will work fine but just wondering, is there no real solution for this?

Posted: Thu 29 Jun 2017, 17:35
by OscarTalks
Make sure your xdg-open has the correct code in the correct position within the file.
In some Puppies it was wrong.
Look for it in /usr/local/bin
If you get it right, clicking magnet links in Chromium will launch the download in Transmission.
This is one that works:-

Code: Select all

#!/bin/sh
#this script created by Jemimah. see: http://murga-linux.com/puppy/viewtopic.php?t=63400&start=150
#110115 xdg-open used to be a symlink to defaulthandler.

case "$1" in 
        '') exit
                ;;
        magnet:*) exec transmission "$1"
                ;;
        *://*) exec rox -U "$1"
                ;;
        *@*.*) exec rox -U "mailto:${1}"
                ;;
        *) exec rox "$1"
                ;;
esac

Posted: Thu 29 Jun 2017, 19:32
by jss83
Found the file but don't know how and where to enter the code, if I open it with geany, it says "does not look like a text file or file encoding is not supported". :?

Posted: Thu 29 Jun 2017, 19:55
by OscarTalks
You should be able to right-click the file and select Open As Text.
If not, just delete it and create a new blank script named xdg-open.
Either way, copy and paste in the code from my post to replace anything that is there in your file.
Save and close. Should work then.

Posted: Thu 29 Jun 2017, 20:07
by jss83
Okay, done did that. Deleted it and made new one and entered the code and it does some processing when i click on magnet link but nothing happens still. Maybe it has to do with Rox? I am on X tahr and it uses thunar file manager? Not sure, just guessing. :?

Posted: Sat 19 May 2018, 11:02
by fmen
Is there an update to this issue?
I am on xianialpup 7.5 with the same issue.
Changing the xdg-open file as suggested did not resolve the problem. Thanks.

Posted: Sat 19 May 2018, 11:43
by drunkjedi
Hello fmen,

Did you try the fix posted?
I had similar finding when I was using tahrpup in 2015.
http://www.murga-linux.com/puppy/viewtopic.php?t=101776

What are the contents of your xdg-open file.

I don't have xenialpup so can't test.

Posted: Sat 19 May 2018, 11:50
by OscarTalks
Using what browser?
I think the xdg-open script is only used by Chromium derivatives
The Mozilla-type browsers including PaleMoon, Firefox and SeaMonkey have a different internal handling system which may need to be initialised.
I don't know of any other "update" to this issue.
All I can tell you is that for me, magnet links open transmission from all my "big" browsers.
My desktop environment is always the standard Puppy ROX-Filer and JWM.

Posted: Sat 19 May 2018, 12:33
by drunkjedi
For those browsers fiddling with about:config will help

Quick search gave me this link
https://support.mozilla.org/en-US/questions/1012864

Posted: Sat 19 May 2018, 12:56
by fmen
Thanks for the quick responses.

I am using xenialpup 7.5 64bit, Rox and JWM.

Original xdg-open:

Code: Select all

#!/bin/sh 
#this script created by Jemimah. see: http://murga-linux.com/puppy/viewtopic.php?t=63400&start=150 
#110115 xdg-open used to be a symlink to defaulthandler. 

case "$1" in 
        '') exit 
                ;; 
        magnet:*) exec transmission "$1" 
                ;; 
        *://*) exec rox -U "$1" 
                ;; 
        *@*.*) exec rox -U "mailto:${1}" 
                ;; 
        *) exec rox "$1" 
                ;; 
esac 
Magnets will open in transmission from palemoon without issues.

Posted: Sat 19 May 2018, 22:43
by fmen

Posted: Sun 20 May 2018, 00:08
by OscarTalks
In xenialpup64 7.5
The problem might be that there is no executable named transmission
There is only transmission-gtk
The xdg-open file is attempting to open the magnet links with transmission which does not exist.
Best solution is to go into /usr/bin
Right-click on transmission-gtk and select link, name the link as transmission
Or open a terminal

Code: Select all

cd /usr/bin
ln -s transmission-gtk transmission
An alternative method would be to edit xdg-open, changing the word transmission to transmission-gtk

Posted: Sun 20 May 2018, 10:30
by fmen
Renaming transmission to transmission-gtk in the gtk-open file did not change anything unfortunately.
So.why does palemoon have no issues with magnets in view of the original configuration of the gtk-open file?

Posted: Sun 20 May 2018, 13:38
by OscarTalks
Try the first idea I suggested
i.e. Make a (relative) symlink to transmission-gtk and name the symlink as transmission
In this case, leave xdg-open as it is.

Apart from any browser associations, adding this symlink will enable opening of transmission from terminal with the command transmission. I think it is always good to be able to launch programs using their names anyway. In fact if Phil does not see this I think I might suggest to him that he needs to add this symlink as an update to xenialpup, because really it is a bug that it is missing I would say.

As I said before, PaleMoon has a completely different mechanism.
PaleMoon does not use xdg-open.
It is reading your system and detecting that the command transmission-gtk is required to open the transmission program.

Also, I would still be curious to know exactly what Chromium derivative browser you are using, including the version number and where you got it from.

Posted: Sun 20 May 2018, 14:58
by fmen
Chromium
Version 65.0.3325.181 (Official Build) Built on Ubuntu , running on (64-bit)

Installed via PPM.

OK, so I dragged transmission-gdk to the desktop and renamed it transmission. Is that a symlink? Clicking it opens transmission. Should that have fixed the chromium problem? It hasn't. Thanks for working with me.

Posted: Sun 20 May 2018, 17:05
by OscarTalks
That is a ROX pinboard icon which operates as a desktop launcher but it won't fix the problem.
A symbolic link will be in your file system and looks like a normal file or directory but with a little arrow in the top left corner.

The graphical way to create one is:-
Locate /usr/bin/transmission-gtk
Right-click > Link and enter the name (transmission in this case) in the little dialog box. This should give you the symlink transmission next to the real file transmission-gtk both alongside each other in /usr/bin

You should then be able to open a terminal, type transmission and press enter and transmission should open. This is effectively what the xdg-open script is trying to do.

By the way, not sure what modifications you made to xdg-open but it might be a good idea to restore it back as it was so long as you have got the symlink in place.

Posted: Sun 20 May 2018, 20:03
by fmen
xdg-open is as follows:

Code: Select all

#!/bin/sh
#this script created by Jemimah. see: http://murga-linux.com/puppy/viewtopic.php?t=63400&start=150
#110115 xdg-open used to be a symlink to defaulthandler.

#!/bin/bash
case "$1" in 
        '') exit
                ;;
        *://*) exec rox -U "$1"
                ;;
        *@*.*) exec rox -U "mailto:${1}"
                ;;
        *) exec rox "$1"
                ;;
        magnet:*) exec transmission"$1" 
                ;;
esac
Creating the symlink transmission from transmission-gtk in /usr/bin and then running transission in console, opens the application.

Clicking on a magnet file in chromium continues to give the same problem.
Maybe I should try re-installing chromium....

Nope, upgrading to v.66 did not help either.

[/code]

Posted: Sun 20 May 2018, 20:22
by OscarTalks
Well that is odd because those contents of xdg-open will not work.
They are different from the contents which you posted earlier in the thread which looked correct, but the changes are NOT the ones I suggested.

The line about magnet and exec transmission needs to be higher up.
This looks like a wrong xdg-open which did appear in some Puppies for a time.

Anyway, best thing to do is delete all of that.
Copy the contents of xdg-open that I posted earlier
( I think the contents you posted the first time were the same as mine)
Paste everything into your xdg-open and save it.
Then try again.