[Portland] xdg-email without GNOME, KDE, or XFCE (Re: xdg-utils upstream status)

Jonathan Nieder jrnieder at gmail.com
Tue Jun 29 05:55:20 PDT 2010


Hi,

Fathi Boudra wrote:

> We don't have a thousand contributors but we're still alive.

Oh, good!  Sorry to misunderstand.  Now for another ignorant question.

What are the XDG tools supposed to do when no standard desktop
environment is present?  I have two examples in mind:

1. xdg-open uses the $BROWSER environment to find a handler for remote
URIs, which makes a lot of sense.  But xdg-settings does not provide a
means (or hint) to read or change that variable.

2. xdg-email uses the $BROWSER environment to invoke an MUA, which
makes a bit less sense.  Here, unfortunately, I suspect that even a
$MAILER variable along the lines of $BROWSER would not be right, since
different mailers have different command-line interfaces.

A simple solution might be an $XDG_MAILER variable that gets set to a
command that should be passed a mailto: URI as an argument.

Afterwards, it would be nice to have something more flexible, like
this:

 - mailer puts a description of its interface somewhere (e.g., a
   .desktop file).  Something like

  X-XDGEmail-Exec=helper %u %b

  where helper is a script that takes a mailto: URI and the path
  to the body of an email and massages the URI into arguments
  for the mail client.

 - user sets $XDG_MAILER variable to the name of the mailer.

This way, one could use the usual name for a mailer without having
to figure out whether it requires a separate --compose option and
whether it will accept a URI as an argument.

What do you think?  Is this worth pursuing?

Jonathan


More information about the Portland mailing list