Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to use a customized program to handle "ed2k://" links , it already got a "*.desktop" file , but how can I bind it with xdg-open as the default handler ?

Since I don't know the exact mimetype of "ed2k://" links , I had to ask here

Temporary solution

Modify xdg-open to handle "ed2k:%2F%2F" links , source code

Still looking for standard work arounds

share|improve this question

1 Answer 1

up vote 5 down vote accepted

The mimetype in question is:

x-scheme-handler/ed2k

I just tried it.

I installed amule and created a file userapp-amule.desktop in ~/.local/share/applications:

[Desktop Entry]
Name=aMule
Name[en_US]=userapp-amule
Exec=amule %u
Icon=amule
Terminal=false
Type=Application
Categories=Network;P2P;
Comment=A client for the eD2k network
MimeType=x-scheme-handler/ed2k

and I also added this line:

x-scheme-handler/ed2k=userapp-amule.desktop

to ~/.local/share/applications/mimeapps.list under [Default Applications] and [Added Associations]. I then opened an ed2k link with xdg-open (note the quotes):

xdg-open 'ed2k://|file|Some.String.Here%5D.%E4%B8%93%E8%BE%91.%28PDF%29.rar|74945828|3788c937a5d436cff6e6808b02d07339|h=4jk63hyesnpxk6xwm5rwgmb2mljxtixz|/'

and it worked:

: Initialising aMule SVN compiled with wxGTK2 v2.8.12 (Snapshot: rev. 10792)
: Checking if there is an instance already running...
: No other instances are running.
: ListenSocket: Ok.
: Loading temp files from /home/me/.aMule/Temp.
share|improve this answer
    
That is great ! –  warl0ck Sep 13 '12 at 7:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.