You are not logged in.

#1 2015-04-02 07:31:48

kurt
Member
Registered: 2009-09-06
Posts: 140

Chromium and xdg-open (Running under KDE 5)

I'm trying to associate magnet links with chromium. I had to create ~/home/<name>/.local/share/applications dir as it didn't exists. I then:-

xdg-mime default ktorrent.desktop application/x-bittorrent
xdg-mime default ktorrent.desktop application/x-torrent
xdg-mime default ktorrent.desktop x-scheme-handler/magnet

And my mimelist now looks like:

[Default Applications]
application/x-bittorrent=ktorrent.desktop
application/x-torrent=ktorrent.desktop
x-scheme-handler/magnet=ktorrent.desktop

However when I click on a magnet link in chromium in pops up the "External Protocol Request" and the following application will be launched "xdg-open". When I click "Launch Application" nothing happens.

So what am I doing wrong or not doing.

TIA

Last edited by kurt (2015-04-02 15:41:21)

Offline

#2 2015-04-02 08:32:02

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: Chromium and xdg-open (Running under KDE 5)

Does opening a magnet / torrent file from a terminal work for you? Would help isolate whether the problem is with xdg, ktorrent or chromium wink

Example below is magnet link for current Arch ISO:

xdg-open "magnet:?xt=urn:btih:257e2c235abbadb4aaf6a971a50cb863a41db2b9&dn=archlinux-2015.04.01-dual.iso&tr=udp://tracker.archlinux.org:6969&tr=http://tracker.archlinux.org:6969/announce"

Last edited by satanselbow (2015-04-02 08:32:28)

Offline

#3 2015-04-02 08:53:31

kurt
Member
Registered: 2009-09-06
Posts: 140

Re: Chromium and xdg-open (Running under KDE 5)

satanselbow wrote:

Does opening a magnet / torrent file from a terminal work for you? Would help isolate whether the problem is with xdg, ktorrent or chromium wink

Example below is magnet link for current Arch ISO:

xdg-open "magnet:?xt=urn:btih:257e2c235abbadb4aaf6a971a50cb863a41db2b9&dn=archlinux-2015.04.01-dual.iso&tr=udp://tracker.archlinux.org:6969&tr=http://tracker.archlinux.org:6969/announce"

Nope, doesn't work I get:

kf5.kservice.sycoca: Trying to open ksycoca from "/home/<name>/.cache/ksycoca5"
#### NO SUPPORT FOR READING!

Ahh perhaps I should have mention I'm running KDE Plasma 5

Last edited by kurt (2015-04-02 08:54:36)

Offline

#4 2015-04-02 11:14:52

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: Chromium and xdg-open (Running under KDE 5)

kurt wrote:

Ahh perhaps I should have mention I'm running KDE Plasma 5

Might have helped tongue All bets are off for me then as I avoid KDE as it is not my thing.

It obviously has it's own take on how xdg works or (more likely) implements it's own system.

Can you not use the "Always open filetype" box from the chrom/ium download bar after saving the first torrent file manually?

Google has this solution to offer

Last edited by satanselbow (2015-04-02 11:21:30)

Offline

#5 2015-04-02 11:31:19

kurt
Member
Registered: 2009-09-06
Posts: 140

Re: Chromium and xdg-open (Running under KDE 5)

satanselbow wrote:
kurt wrote:

Ahh perhaps I should have mention I'm running KDE Plasma 5

Might have helped tongue All bets are off for me then as I avoid KDE as it is not my thing.

It obviously has it's own take on how xdg works or (more likely) implements it's own system.

Can you not use the "Always open filetype" box from the chrom/ium download bar after saving the first torrent file manually?

Google has this solution to offer

Yep found that and tried it:

rm ~/.cache/ksycoca5

kbuildsycoca5
kbuildsycoca5 running...
kf5.kservice.sycoca: Trying to open ksycoca from "/home/<name>/.cache/ksycoca5"
Reusing existing ksycoca
Recreating ksycoca file ("/home/<name>/.cache/ksycoca5", version 300)
Still in the time dict (i.e. deleted files) ("apps")
Menu "applications-kmenuedit.menu" not found.
Saving
Emitting notifyDatabaseChanged ("apps")

Afterwards no joy - Get the same error.

Offline

#6 2015-04-02 12:17:19

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: Chromium and xdg-open (Running under KDE 5)

May be worth editing your original post title to mention "KDE Plasma 5" - should bring some KDE expertise your way  wink

Offline

#7 2015-07-26 18:53:35

pinkeen
Member
Registered: 2015-07-26
Posts: 3

Re: Chromium and xdg-open (Running under KDE 5)

If you migrated from kde4 (like me) then this fixes the issue:

$ sudo cp /usr/share/kde4/services/magnet.protocol /usr/share/kservices5/
$ kbuildsycoca5

If you don't have the magnet.protocol file then the contents is (I use ktorrent):

[Protocol]
exec=ktorrent "%u"
protocol=magnet
Icon=kt-magnet
input=none
output=none
helper=true
listing=
reading=false
writing=false
makedir=false
deleting=false
URIMode=rawuri

Offline

#8 2015-07-27 18:20:03

grassmonk
Member
From: Utah
Registered: 2007-11-14
Posts: 68

Re: Chromium and xdg-open (Running under KDE 5)

After migrating from KDE 4, what I did was manually edit /usr/share/applications/kde4/ktorrent.desktop and change

MimeType=application/x-bittorrent;application/x-torrent;

to

MimeType=application/x-bittorrent;application/x-torrent;x-scheme-handler/magnet;

There is an open bug report at https://bugs.archlinux.org/task/43637

Offline

Board footer

Powered by FluxBB