What defines the command run with `Send email to…`?

Asked by Sparhawk on 2016-05-31

When I right-click an email address, I can select `Send email to…`. However, this opens up Thunderbird, which I don't normally use.

In ~/.local/share/applications/mimeapps.list, I've defined a custom command to run for mailto links (open up a new tab in Terminator with mutt; give it focus if it's behind). Hence if I run `xdg-open mailto:<email address hidden>`, this works. However this command is not run when I use Terminator's right-click menu.

What defines the command run with `Send email to…`?

Question information

Language:
English Edit question
Status:
Solved
For:
Terminator Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Boddy
Solved:
2016-05-31
Last query:
2016-05-31
Last reply:
2016-05-31

OK, this depends. If your Gtk 2 is 2.14.0 or newer, it will use the gtk default function show_uri which I understand will use the default email client in the "System Settings", "System", "Details", "Default Applications", "Mail" option.

If gtk is older, or the show_uri fails with an exception it will fall back to use the xdg-open method. If that fails it then falls back to using a python library function webbrowser.open().

I'm not sure in your particular usage case what you need to change the "Mail" option to, but this should be enough info for you to figure it out.

Hmmm. Some further info here: https://bugs.launchpad.net/terminator/+bug/863866

Looks like this is what the "Use custom URL handler" option is for in the Global preferences tab.

Sparhawk (sparhawkthesecond) said : #3

Oh yes, that option is perfect! FWIW I am using KDE Plasma, so I was struggling with modifying the GTK settings. In any case, your second post works wonderfully. Thank you!

(For reference, I just ticked the box and put `xdg-open` in the field.)

Sparhawk (sparhawkthesecond) said : #4

Thanks Stephen Boddy, that solved my question.