Registering my application as capable of handling the mailto: URLs

Jan Kundrát jkt at
Fri Nov 23 09:50:07 PST 2012

I was wondering what is the correct way to mark my application as "hey, I am capable of dealing with the mailto: URLs, and you should launch me as `trojita --compose mailto-url-goes-here` if I'm picked as the default one by the user".

I've read through the archives of this list to notice that this is a recurring topic, but as far as I know, no definite decision has been reached so far AFAIK.

Please note that there are two parts to the problem of "default mail client":

1) get a list of applications which *can* act as an e-mail client,
2) specify the user's preference on which one shall be used

I'm asking for 1) here; I assume that configuring which application shall be the default one shall be left to the DE configuration.

As of 2), my understanding is that the x-scheme-handler/mailto MIME type in a .desktop file might be the way to go, but that applications shall never put that into their own .desktop files. I've read through KDE's code, started at /usr/share/applications/kde4/kmailservice.desktop, continued via kdelibs/kio/misc/kmailservice.cpp to kdelibs/kdecore/kernel/ktoolinvocation.cpp and stopped at [1] which looks like the choice of a default is indeed handled by the user's preferences.

So, how do I mark my application as "I can send e-mails"? What steps do I have to undertake to make it available in the DE's options for the default e-mail client?

With kind regards,


Trojita, a fast e-mail client --

More information about the xdg mailing list