site  contact  subhomenews

Handle mailto mime in xdg-open

July 18, 2026 — BarryK

In response to question about /usr/sbin/mailto.sh in Easy:

https://forum.puppylinux.com/viewtopic.php?p=174000#p174000

I cannot recall how mailto.sh was used, anyway have removed it.

/usr/bin/xdg-open has handling for an email address.
An application can call xdg-open, passing an email address, and it is then supposed to open in the appropriate email client app.
The line that does this in xdg-open:

 *@*.*)
  exec rox -U "mailto:${1}"
 ;;

...which does nothing.

I have created /etc/xdg/rox.sourceforge.net/URI/mailto:

#!/bin/sh
#20260718

if type -p mozmail >/dev/null;then
 exec mozmail -compose "to='${1}'"
elif type -p claws-mail >/dev/null;then
 exec claws-mail --compose "$1"
elif type -p claws >/dev/null;then
 exec claws --compose "$1"
elif type -p sylpheed >/dev/null;then
 exec sylpheed --compose "$1"
fi

I'm not 100% sure about this mechanism, but it is a step in the right direction.   

Tags: easy