From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: icecat "mailto" handler does not work - and cannot be reconfigured by user Date: Mon, 25 Jul 2016 09:34:40 +0200 Message-ID: <20160725093440.5d4f9c6f@scratchpost.org> References: <579027b7.VHXjhpPxQC3AAmeY%pjotr.public12@email> <8760rznoh1.fsf@gnu.org> <20160722004130.GA10340@thebird.nl> <874m7hk6dz.fsf_-_@gnu.org> <20160724033027.GA20236@thebird.nl> <20160724135828.GA6502@solar> <20160724152150.GA16481@novena-choice-citizen> <20160724191839.10d69bfe@scratchpost.org> <20160724192540.35ef4511@scratchpost.org> <87oa5m6zv9.fsf@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRaPl-0007g8-U9 for guix-devel@gnu.org; Mon, 25 Jul 2016 03:35:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRaPh-0001E7-Gt for guix-devel@gnu.org; Mon, 25 Jul 2016 03:35:01 -0400 In-Reply-To: <87oa5m6zv9.fsf@mdc-berlin.de> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org, bug-guix@gnu.org > Unless I misunderstood what you mean: this already exists. On the page > you linked to above look for =E2=80=9Creply via email to=E2=80=9D. It=E2= =80=99s followed by a > button. When you click on it you get a =E2=80=9Cmailto=E2=80=9D-Link. Whoops. I should have read the page better. However, clicking on that button in icecat does not send E-Mail for me.=20 Monitoring the network interface I can see that it redirects to a mailto: U= RL. 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. O= ne 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_handlerS= ervice.js that does: let isLinux =3D ("@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 =3D Cc["@mozilla.org/gio-service;1"]. createInstance(Ci.nsIGIOService); try { gIOSvc.getAppForURIScheme("mailto"); noMailto =3D false; } catch (ex) { noMailto =3D true; } } And this ./toolkit/system/gnome/nsGIOService.cpp uses g_app_info_launch_def= ault_for_uri . Therefore, I tried it out: #include #include #include int main() { GError* error; g_app_info_launch_default_for_uri("mailto:foo@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) =3D 3 open("/home/dannym/.guix-profile/share/mime/mime.cache", O_RDONLY) =3D 3 open("/run/current-system/profile/share/mime/mime.cache", O_RDONLY) =3D 3 open("/home/dannym/.guix-profile/share/mime/mime.cache", O_RDONLY) =3D 3 open("/run/current-system/profile/share/mime/mime.cache", O_RDONLY) =3D 3 open("/home/dannym/.guix-profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DI= RECTORY|O_CLOEXEC) =3D 3 open("/home/dannym/.guix-profile/lib/gio/modules/giomodule.cache", O_RDONLY= ) =3D 4 open("/home/dannym/.guix-profile/lib/gio/modules/libdconfsettings.so", O_RD= ONLY|O_CLOEXEC) =3D 4 open("/run/current-system/profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_D= IRECTORY|O_CLOEXEC) =3D 3 open("/run/current-system/profile/lib/gio/modules/giomodule.cache", O_RDONL= Y) =3D 4 open("/gnu/store/6qrijb6cfyvs8svacr0l9a75vcpypr5f-glib-2.48.0/lib/gio/modul= es", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =3D 3 open("/gnu/store/4lbgxvsk8xl75hlkjqgrqvmpq74app73-dconf-0.26.0/lib/gio/modu= les", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =3D 3 open("/gnu/store/4lbgxvsk8xl75hlkjqgrqvmpq74app73-dconf-0.26.0/lib/gio/modu= les/giomodule.cache", O_RDONLY) =3D 4 open("/home/dannym/.guix-profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DI= RECTORY|O_CLOEXEC) =3D 3 open("/home/dannym/.guix-profile/lib/gio/modules/giomodule.cache", O_RDONLY= ) =3D 4 open("/run/current-system/profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_D= IRECTORY|O_CLOEXEC) =3D 3 open("/run/current-system/profile/lib/gio/modules/giomodule.cache", O_RDONL= Y) =3D 4 open("/gnu/store/m3py3rk71ihlfgvj2kss7054hwfqwkpq-glib-2.48.0/lib/gio/modul= es", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =3D 3 [pid 12632] open("/usr/share/locale/locale.alias", O_RDONLY [pid 12632] open("/home/dannym/.config/mimeapps.list", O_RDONLY) =3D 5 [pid 12632] open("/gnu/store/8m00x5x8ykmar27s9248cmhnkdb2n54a-glibc-2.22/li= b/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) =3D 5 [pid 12632] open("/home/dannym/.local/share/applications", O_RDONLY|O_NONBL= OCK|O_DIRECTORY|O_CLOEXEC) =3D 5 [pid 12632] open("/home/dannym/.local/share/applications/mimeapps.list", O_= RDONLY) =3D 5 [pid 12632] open("/home/dannym/.local/share/applications/mimeinfo.cache", O= _RDONLY) =3D 5 [pid 12632] open("/home/dannym/.guix-profile/share/applications", O_RDONLY|= O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =3D 5 [pid 12632] open("/run/current-system/profile/share/applications", O_RDONLY= |O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =3D 5 [pid 12632] open("/run/current-system/profile/share/applications/mimeinfo.c= ache", O_RDONLY) =3D 5 [pid 12632] open("/home/dannym/.guix-profile/share/applications", O_RDONLY|= O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =3D 5 [pid 12632] open("/run/current-system/profile/share/applications", O_RDONLY= |O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =3D 5 [pid 12632] open("/run/current-system/profile/share/applications/mimeinfo.c= ache", O_RDONLY) =3D 5 There would be g_app_info_set_as_default_for_type () to set a new default a= pplication in nsGIOService - which is exposed and used by ./browser/compone= nts/shell/nsGNOMEShellService.cpp on setting icecat up as default browser (= so not always). I'm using Fluxbox.