Dear Maintainer,
I have selected "Use Gmail" in Firefox Settings -> General -> Applications ->
mailto.
Then I wanted to assign Firefox as a default mailing app in Default
Applications of Gnome settings in order to launch Firefox with Gmail
automatically from external apps. However, Firefox wasn't listed among
available options for Mail.
The reason is probably in the fact that x-scheme-handler/mailto isn't listed in
MimeType field of /usr/share/applications/firefox-esr.desktop:
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-
handler/http;x-scheme-handler/https;
The man page of xdg-mime says: "The application's desktop file must list
support for all the MIME types that it wishes to be the default handler for".
So the fix might look as follows:
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-
handler/http;x-scheme-handler/https;x-scheme-handler/mailto;
As a workaround I had to assign Firefox manually via the configuration file
~/.config/mimeapps.list:
[Default Applications]
x-scheme-handler/mailto=firefox-esr.desktop
Only after this manual intervention Gnome accepted Firefox as a mail app.
Reported to Firefox Bugzilla too:
https://bugzilla.mozilla.org/show_bug.cgi?id=1839244