Subject: Re: bug#24066: icecat "mailto" handler does not work - and cannot be reconfigured by user

From: Maxim Cournoyer <[email-masked]>
Date: Tue, 13 Oct 2020 09:23:09 -0400

Hello Danny,

Danny Milosavljevic <[email-masked]> writes:

[...]

> Checking the application preferences of icecat, it only gives "always
> ask" (note: it doesn't ask) and not an application for "mailto". (in
> GuixSD)

Testing in latest IceCat, there's a 'Use other...' entry in the mailto
applications configuration.  I also saw 'Emacs' in the list of potential
applications to open mailto URIs, tried it and it opened Emacs.

Does that work for you?

To get the applications recognized as supporting this URI scheme, they
must provide a .desktop file which mentions support for it, for example
via a MimeType=x-scheme-handler entry:

--8<---------------cut here---------------start------------->8---
$ grep -rin 'x-scheme-handler' $(guix build weechat)
/gnu/store/...-weechat-2.9/share/applications/weechat.desktop:17:MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;--8<---------------cut here---------------end--------------->8---

This information gets compiled into a MIME database by a profile hook
under:

--8<---------------cut here---------------start------------->8---
$ grep 'x-scheme-handler/ircs' ~/.guix-profile/share/applications/mimeinfo.cache 
x-scheme-handler/ircs=weechat.desktop;
--8<---------------cut here---------------end--------------->8---

And Icecat picks its up to show ircs:// URIs and shows the application
as registered for this type in its Applications settings view.

Maxim