GNU bug report logs - #24066
icecat "mailto" handler does not work - and cannot be reconfigured by user

Previous Next

Package: guix;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Mon, 25 Jul 2016 07:36:01 UTC

Severity: normal

To reply to this bug, email your comments to 24066 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#24066; Package guix. (Mon, 25 Jul 2016 07:36:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 25 Jul 2016 07:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: <guix-devel <at> gnu.org>, bug-guix <at> gnu.org
Cc: Jookia <166291 <at> gmail.com>, Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: icecat "mailto" handler does not work - and cannot be reconfigured
 by user
Date: Mon, 25 Jul 2016 09:34:40 +0200
> Unless I misunderstood what you mean: this already exists.  On the page
> you linked to above look for “reply via email to”.  It’s followed by a
> button.  When you click on it you get a “mailto”-Link.

Whoops. I should have read the page better.

However, clicking on that button in icecat does not send E-Mail for me. 

Monitoring the network interface I can see that it redirects to a mailto: URL. So that's nice.

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

Creating my own HTML page with a mailto link doesn't work either.

Therefore, I reported a bug to Guix too.

Bug report follows:

"mailto:" links don't work in icecat.

Checking the icecat source code, there are several ways to handle E-Mail. One of them is as "external helper app". One of those (not sure whether it's the correct one) uses gio's g_app_info_launch_default_for_uri in order to launch helper applications.

There is a test icecat-38.8.0/uriloader/exthandler/tests/unit/test_handlerService.js that does:

  let isLinux = ("@mozilla.org/gio-service;1" in Components.classes);
  if (isLinux) {
    // Check mailto handler from GIO
    // If there isn't one, then we have no mailto handler
    let gIOSvc = Cc["@mozilla.org/gio-service;1"].
                 createInstance(Ci.nsIGIOService);
    try {
      gIOSvc.getAppForURIScheme("mailto");
      noMailto = false;
    } catch (ex) {
      noMailto = true;
    }
  }

And this ./toolkit/system/gnome/nsGIOService.cpp uses g_app_info_launch_default_for_uri .

Therefore, I tried it out:

#include <glib.h>
#include <gio/gio.h>
#include <stdlib.h>

int main() {
        GError* error;
        g_app_info_launch_default_for_uri("mailto:foo <at> example.com", NULL, &error);
        // g_app_info_launch_default_for_uri("http://www.google.at/", NULL, &error);
        if (error) {
                g_warning("err %s", error->message);
                g_error_free(error);
                return 1;
        } else
                return 0;
}

I get:

** (process:12464): WARNING **: err Operation not supported

If I debug it some more I get:

$ strace -f ./g 2>&1 |grep open |grep -v ENOENT

open("/home/dannym/.local/share//mime/mime.cache", O_RDONLY) = 3
open("/home/dannym/.guix-profile/share/mime/mime.cache", O_RDONLY) = 3
open("/run/current-system/profile/share/mime/mime.cache", O_RDONLY) = 3
open("/home/dannym/.guix-profile/share/mime/mime.cache", O_RDONLY) = 3
open("/run/current-system/profile/share/mime/mime.cache", O_RDONLY) = 3
open("/home/dannym/.guix-profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/home/dannym/.guix-profile/lib/gio/modules/giomodule.cache", O_RDONLY) = 4
open("/home/dannym/.guix-profile/lib/gio/modules/libdconfsettings.so", O_RDONLY|O_CLOEXEC) = 4
open("/run/current-system/profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/run/current-system/profile/lib/gio/modules/giomodule.cache", O_RDONLY) = 4
open("/gnu/store/6qrijb6cfyvs8svacr0l9a75vcpypr5f-glib-2.48.0/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/gnu/store/4lbgxvsk8xl75hlkjqgrqvmpq74app73-dconf-0.26.0/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/gnu/store/4lbgxvsk8xl75hlkjqgrqvmpq74app73-dconf-0.26.0/lib/gio/modules/giomodule.cache", O_RDONLY) = 4
open("/home/dannym/.guix-profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/home/dannym/.guix-profile/lib/gio/modules/giomodule.cache", O_RDONLY) = 4
open("/run/current-system/profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/run/current-system/profile/lib/gio/modules/giomodule.cache", O_RDONLY) = 4
open("/gnu/store/m3py3rk71ihlfgvj2kss7054hwfqwkpq-glib-2.48.0/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
[pid 12632] open("/usr/share/locale/locale.alias", O_RDONLY <unfinished ...>
[pid 12632] open("/home/dannym/.config/mimeapps.list", O_RDONLY) = 5
[pid 12632] open("/gnu/store/8m00x5x8ykmar27s9248cmhnkdb2n54a-glibc-2.22/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) = 5
[pid 12632] open("/home/dannym/.local/share/applications", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
[pid 12632] open("/home/dannym/.local/share/applications/mimeapps.list", O_RDONLY) = 5
[pid 12632] open("/home/dannym/.local/share/applications/mimeinfo.cache", O_RDONLY) = 5
[pid 12632] open("/home/dannym/.guix-profile/share/applications", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
[pid 12632] open("/run/current-system/profile/share/applications", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
[pid 12632] open("/run/current-system/profile/share/applications/mimeinfo.cache", O_RDONLY) = 5
[pid 12632] open("/home/dannym/.guix-profile/share/applications", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
[pid 12632] open("/run/current-system/profile/share/applications", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
[pid 12632] open("/run/current-system/profile/share/applications/mimeinfo.cache", O_RDONLY) = 5

There would be g_app_info_set_as_default_for_type () to set a new default application in nsGIOService - which is exposed and used by ./browser/components/shell/nsGNOMEShellService.cpp on setting icecat up as default browser (so not always).

I'm using Fluxbox.




Information forwarded to bug-guix <at> gnu.org:
bug#24066; Package guix. (Tue, 13 Oct 2020 13:24:02 GMT) Full text and rfc822 format available.

Message #8 received at 24066 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: guix-devel <at> gnu.org, Jookia <166291 <at> gmail.com>,
 Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>, 24066 <at> debbugs.gnu.org
Subject: Re: bug#24066: icecat "mailto" handler does not work - and cannot
 be reconfigured by user
Date: Tue, 13 Oct 2020 09:23:09 -0400
Hello Danny,

Danny Milosavljevic <dannym <at> scratchpost.org> 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




Information forwarded to bug-guix <at> gnu.org:
bug#24066; Package guix. (Fri, 16 Oct 2020 07:13:02 GMT) Full text and rfc822 format available.

Message #11 received at 24066 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: 24066 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: Re: icecat "mailto" handler does not work - and cannot be
 reconfigured by user
Date: Fri, 16 Oct 2020 18:12:40 +1100
If I click the reply via email button in Icecat, it switches to icedove 
but does not open a reply email at all.
In ungoogled-chromium, it opens up a blank reply email, failing to fill 
the To, CC, Subject with anything.

If I click the equivalent mailto link on the issues page in Icecat, its 
the same
If I click the equivalent mailto link...., but in chromium, it opens a 
new email, but only the Subject is filled out. No To or CC.

I've always thus replied to the mailing list by manually copy-pasting 
the the Subject, adding Re:, and trying to find the posters email 
address, and bug address to add in To/CC. Is this related to your bug?






Information forwarded to bug-guix <at> gnu.org:
bug#24066; Package guix. (Mon, 26 Oct 2020 16:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 24066 <at> debbugs.gnu.org (full text, mbox):

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: 24066 <at> debbugs.gnu.org
Subject: icecat "mailto" handler does not work - and cannot be reconfigured by
 user
Date: Mon, 26 Oct 2020 17:39:46 +0100
This issue annoys me, so I searched for a workaround which I found :)

In Icecat go to about:preferences -> General -> Applications (only a
header): Set mailto to `Use other` and set it to
`/run/current-system/profile/bin/icedove`.

$ grep mailto
/gnu/store/3zxx08qfl9q6d9s80p58521y9x3ni3p1-icedove-78.3.3/share/applications/icedove.desktop
MimeType=x-scheme-handler/mailto;

That seems correct. xdg-open mailto:foo <at> gnu.org works for me always, so
it really seems a Icecat/Firefox thing...




This bug report was last modified 4 years and 228 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.