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

1 Answer 1


The mimetype in question is:


I just tried it.

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

[Desktop Entry]
Exec=amule %u
Comment=A client for the eD2k network

and I also added this line:


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.
  • That is great !
    – daisy
    Commented Sep 13, 2012 at 7:43
  • New versions of Ubuntu have config at ~/.config/mimeapps.list
    – AndreyP
    Commented Apr 18, 2022 at 11:46
  • Also MimeType=x-scheme-handler in .desktop and x-scheme-handler in [Default Applications] was not needed
    – AndreyP
    Commented Apr 18, 2022 at 13:39
  • @AndreyP - indeed, this is a very old post... as I see, defaults have changed... feel free to edit or update the answer if you have the time, I made it community wiki so anyone with at least 100 rep can edit it. Commented Apr 19, 2022 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .