Can't open magnet links with chromium 59

Using applications, configuring, problems
Message
Author
User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#16 Post 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.
Oscar in England
Image

fmen
Posts: 51
Joined: Mon 07 May 2018, 12:22

#17 Post 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.

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#18 Post 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.
Oscar in England
Image

fmen
Posts: 51
Joined: Mon 07 May 2018, 12:22

#19 Post 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]

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#20 Post 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.
Oscar in England
Image

fmen
Posts: 51
Joined: Mon 07 May 2018, 12:22

#21 Post by fmen »

Thanks Oscar, but it's time to throw in the towel. Regardless of where the transmission statement is located in the xdg-open file, still no pleasure.

Luckily, the work-around is a mere keyboard shortcut away...

Code: Select all

#!/bin/bash
xdotool click 3
sleep .1
xdotool key Down Down Down Down Return
xdotool exec transmission-gtk 
sleep .5
xdotool key ctrl+u  Return

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#22 Post by OscarTalks »

As you wish, but just to let you (and others) know
I did a quick test. Fresh boot of Xenial64 7.5
Updated PPM and used it to install Chromium 66
Created the transmission symlink to transmission-gtk in /usr/bin
Copied and pasted the correct code (as per my earlier post) into /usr/local/bin/xdg-open
It then works.

The whole thing took me about 5 minutes.
Standard Chromium installation plus the 2 necessary fixes

I open Chromium, search for a magnet link, click on the magnet link and Transmission opens and downloads the torrent. I do get the window asking for confirmation about xdg-open and also a couple of other steps that I have to "OK" when Transmission opens.
Oscar in England
Image

fmen
Posts: 51
Joined: Mon 07 May 2018, 12:22

#23 Post by fmen »

I do get the window asking for confirmation about xdg-open and also a couple of other steps that I have to "OK" when Transmission opens.
Ah jeez, now I feel like a damn fool!
Once the window came up, I assumed it had failed and stopped going forwards. Sorry for that. Works great!

Post Reply