Deepin-desktop: chromium: xdg-email: no method available for opening 'mailto:'

HOW TO REPRODUCE:

RESULT:

  • It does nothing.

RELEVANT DETAILS:

  • Thunderbird is set as handler of email in the control center.
  • Mail links work on LibreOffice.
  • No web page is set as handler of the mailto protocol.

SYSTEM SPECS:

  • chromium 68.0.3440.08
  • thunderbird 52.9.1-1
  • deepin-control-center 4.6.2-1
  • manjaro 17.1.11

Working on Chromium 68.0.3440.106, Thunderbird 60.0, gnome 3.28.2
I don’t know if it is Deepin-related or Thunderbird-related

1 Like

The terminal says:
xdg-email: no method available for opening 'mailto:example@mail.com'

linuxquestions.org suggest adding this to .bashrc:
export BROWSER="gvfs-open"

But if in the Terminal I enter:
gvfs-open

It says:
This tool has been deprecated, use 'gio open' instead.

As a bad tip, i’d reinstall the Thunderbird package. I found how to set mime types but i don’t know the exact command :confused:

I think that the MIME type you are looking for is called x-scheme-handler/mailto.

To set Thunderbird as the default application for opening this MIME type, you can try:
xdg-mime default thunderbird.desktop x-scheme-handler/mailto

To confirm that Thunderbird is the default application for opening this MIME type:
xdg-mime query default x-scheme-handler/mailto

The output of the last command should be:
thunderbird.desktop

More information in the man page of xdg-mime here.

I hope that helps!

1 Like

It didn’t work for me :confused:

The issue seems to be related to the xdg-email script, as you already pointed out. Chromium uses this script as a handler for opening mailto links. I think that for some reason your DE (Deepin) is not recognized by xdg-email or its value is getting overwritten (?).

After searching, I found a possible solution in the Arch Forums:
https://bbs.archlinux.org/viewtopic.php?pid=1419953#p1419953 (post #4 of the thread)

This approach suggests ‘hacking’ the xdg-email script located in the /usr/bin/ directory. This is not a very elegant solution, since this file will get overwritten when the package xdg-utils gets upgraded to a new version, but it might work.
I tested this, using DE=“gnome3” in my system (XFCE) works as expected.

Another approach would be using xdg-open instead of xdg-email for opening mailto links in Chromium. First you have to confirm that xdg-open works. xdg-open example@mail.com should open the default email client (Thunderbird in this case), just like xdg-email example@mail.com would.

If xdg-open works, you can try out this tutorial from the Arch Forums:
https://bbs.archlinux.org/viewtopic.php?id=154031
Bare in mind that this is an old tutorial, so the provided information might be outdated or invalid (I didn’t test it).

2 Likes
$ xdg-email example@mail.com
xdg-email: no method available for opening 'mailto:example@mail.com'
$ xdg-open example@mail.com
main.go:63: openFile: "example@mail.com"
main.go:70: stat /home/user/example@mail.com: no such file or directory

I will investigate the info you provided. Thank you :wink:

1 Like

This probably means that xdg-open is trying to open this MIME type as a file or directory.
Maybe this will work:
xdg-open 'mailto:example@mail.com'
or
xdg-open 'example@mail.com'

1 Like

Editing the xdg-email file worked for me, so this is a bug.

1 Like

Using xdg-open works without changing any file, so it seems like a plausible fix for Chromium.

Thank you :slight_smile:

1 Like

I fixed the bug myself upstream :stuck_out_tongue:

1 Like

Great work on that! :+1:

My first thought was something not working correctly in the open_generic() function of the script, but obviously I was wrong.

I would suggest changing the solution to your latest post, this way it will be less confusing for users who read the topic. :slightly_smiling_face:

No, as your response is the work-around :upside_down_face:

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

This is a follow up of this closed thread: https://forum.manjaro.org/t/deepin-desktop-chromium-xdg-email-no-method-available-for-opening-mailto/56737/12

Basically if you run xdg-email "someuser@someemail.tld in Manjaro Deepin and it gives you

xdg-email: no method available for opening 'mailto:'

what you should do is edit the file /usr/bin/xdg-email and under the line "DEEPIN|Deepin|deepin)" change the variable "DE" to "gnome".

This fixed my issue.

What I want is for other users to not have to make this manual fix.

Have a good day

Sounds like a bug in DeepinDE which you should report to the developers?

As @es20490446e already mentioned, this issue was reported to freedesktop and deepin and the bug was fixed in commit 56991bc165577f011f9ad7ca721c5a5134710e33 in xdg-utils
Credit for the report and the fix belong to @es20490446e.

I think this fix will be included in the next release of xdg-utils.

1 Like