protocol/scheme entry in .desktop?
Claes H
claesatwork at gmail.com
Mon Nov 26 07:53:59 PST 2007
Hi,
On Nov 26, 2007 10:53 AM, Patrice Dumas <pertusus at free.fr> wrote:
> Hello,
>
> Currently the mime information that allows to chose an application based
> on the mimetypes it handles is part of the .desktop file. But another
> item of an url that could be a criterium for application selection is the
> protocol/scheme that appears in front of urls, like http, ftp or file.
> So maybe it could be nice to add a new entry in the desktop entry,
> called Protocol or Scheme, with a ; delimited list of protocols handled
> by the application.
>
This makes sense. I want to point out that there is a standardization
effort underway regarding web applications / web services in WhatWG
that relates to this. The HTML 5 draft defines two new javascript APIs
that allows web sites to register web services as handlers for
protocols and content. They are called registerProtocolHandler(),
which takes a protocol and URI as argument, and
registerContentHandler() which takes mime type and URI as argument.
The URI is a web service that can handle the protocol or the mimetype.
It corresponds to the command string or program in a desktop
environment. Using these new APIs it will be possible to register that
the mailto: protocol should be opened by GMail, for example. The new
Firefox 3 beta have these APIs implemented, but so far I am not aware
of any such web service to try it out on. You can read the draft
description at http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers
Also, there is an underlying assumption for certain protocols that the
web browser should hand over the URL as-is to an application that
understands it, rather than retrieve the contents of the URL and hand
that over to the application. The webcal protocol is one example, see
the following blog entry for a good description:
http://larry.cannell.org/webcal
It would be good if the browser and the desktop could share these
settings, so xdg-open would act the same way for a mailto: URL as
Firefox would. The first step to accomplish this would be to make sure
that the semantics of protocol handler and content handler
registration is similar.
Claes
More information about the xdg
mailing list