[Portland] Re: xdg-email & xdg-open

Kevin Krammer kevin.krammer at gmx.at
Mon Nov 13 15:01:17 PST 2006


Hi Waldo,

On Monday 13 November 2006 23:01, Bastian, Waldo wrote:

> I was wondering what to do with xdg-email and xdg-open. For a number of
> reasons it seems likely that xdg-open will be used for mailto: urls as
> much as xdg-email. Perhaps some of the xdg-email functionality should be
> moved to xdg-utils-common so that xdg-open and xdg-email can share the
> same implementation / work arounds.

My first reaction was to call xdg-email from xdg-open when the passed URI is a 
mailto

However, basically all code paths beside KDE are equal, once xdg-email has 
created the final mailto URI

Example
$ xdg-email mailto:kevin.krammer at gmx.at
in a GNOME, XFCE or unknown environment will be equal to
$ xdg-open mailto:kevin.krammer at gmx.at

So we could do this:
in xdg-open: change the KDE code path to check for mailto and call the 
kmailservice instead of kfmclient exec.
(Whatever we do for the other problem, we should probably do this anyway)

in xdg-email: when getting an mailto, delegate it to xdg-open
xdg-email would then be a formatter for mailto URIs

This is a small change in behavior, because right now one can do

$ xdg-email --cc foo at example.com mailto:bar at example.com?subject=test

> Very much related to this is what to do with attachment handling.
> Mozilla Thunderbird doesn't allow to specify attachments at all at the
> moment because allowing that from a mailto URL is considered a security
> risk. It would make sense to alllow this for explicitly specified
> attachments as currently possible with xdg-email, but xdg-open shouldn't
> allow one to specify attachments.

Hmm, I think we will need to pass it as a mailto URI when detecting one of the 
DEs.
Otherwise we would need to query, if at all possible, the DE's settings, check 
if the configured client is known to need a workaround, and call them 
according to this workaround.

Additonal to having to retrieve, understand and parse the DE's settings, the 
keeping ofapplication specific workarounds up to date will be very time 
consuming and not backwards compatible in case the commandline handling 
changes.

It's quite disappointing that Mozilla is imposing this "security" feature 
instead of letting the originator (browser, other application) decide whether 
it trusts the URI's parts :(

However, since this seems to be so important to them, it is something between 
them and their users. Thunderbird user will not expect automatically supplied 
attachments to work and user of other mail clients are not affected.

> The way that Qt uses xdg-open, even 
> for mailto URLs, is definittly going to be a problem here.

Don't think this will be a problem. QDesktopServices seems to be scheme based, 
so they could just register xdg-email for mailto, maybe they have this 
configurable through qt-config?

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/portland/attachments/20061114/058e902d/attachment.pgp


More information about the Portland mailing list