DESKTOP_LAUNCH spec. (rehash)

Michael Meeks michael at ximian.com
Tue Aug 17 13:31:28 EEST 2004


Hi guys,

	So - this is the DESKTOP_LAUNCH spec. it's an incredibly simple thing,
but then - it's very useful. I'd love to get this onto the fd.o
standards list, no idea how to upload stuff there.

	In addition; to make vendors' lives that much easier, and since (at
least) Gnome is in a frozen state, I also attach the patches that make
this fly for us. The implementation of the 'desktop-launch' shell script
is left to the distribution vendor; ours starts:

	#! /bin/bash

# Try DESKTOP_LAUNCH

if [ -n "$DESKTOP_LAUNCH" ] ; then
  if [ -x "$DESKTOP_LAUNCH" ] ; then
    exec "$DESKTOP_LAUNCH" ${1+"$@"}
  fi

  LAUNCH="`which \"$DESKTOP_LAUNCH\" 2> /dev/null`"
  if [ -x "$LAUNCH" ] ; then
    exec "$LAUNCH" ${1+"$@"}
  fi
fi

	Before going on to other more wild & woolly ways of trying to do the
same thing :-)

	The attached patches are Jan's work - there was also a small fix to
KMail to support "attachment" I think. Currently I believe evolution /
KMail supports 'attach' and not 'attachment', so I guess we should fix
that to be in-line with Mozilla.

	HTH,

		Michael.

-- 
 michael at ximian.com  <><, Pseudo Engineer, itinerant idiot

-------------- next part --------------
* Launching desktop URI handlers
	2004/08/17 - Michael Meeks & Jan Holesovsky

** Abstract

	It is often useful for an application to allow the launching
of a helper application on the same screen to display a URI. This
method provides a simple mechansim for achieving this in a
cross-desktop compatible fashion.

** Requirements

	+ The desktop session environment will include a
	  DESKTOP_LAUNCH environment variable.

	+ The session path shall include a program named
	  'desktop-launch' that initially attempts to
	  execute the contents of $DESKTOP_LAUNCH
	  passing on to it any provided arguments.

** In more detail

	The DESKTOP_LAUNCH environment variable should point to an
executable with as little system-specific qualification as possible.
ie. 'kde-open' is preferable to /opt/kde3/bin/kde-open since it is
more likely to transfer to a more diverse range of (possibly remote)
systems.

	The desktop-launch program can adopt other strategies for
detecting the current desktop, and appropriate handler to execute -
however it must initially attempt to execute the $DESKTOP_LAUNCH
variable. The desktop-launch must return a status code to indicate if
the launch succeded; in the normal fashion.

** Special URIs

	Most URIs are uncontroversial, the mailto: URI (cf. RFC 2368),
has a couple of extra quirks. For maximum compatibility, the
traditional form for simple recipients should be preferred;
	    ie. mailto:dave at cridland.net
rather than     mailto:?to=dave at cridland.net

	In addition, attachments should be denoted by (multiple)
'attachment' attributes, each containing a URI string.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kde-open
Type: application/x-shellscript
Size: 124 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20040817/ad04e99d/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: startkde.diff
Type: text/x-patch
Size: 634 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20040817/ad04e99d/attachment-0001.bin 


More information about the xdg mailing list