Launching .desktop files with GIO

Jannis Pohlmann jannis at xfce.org
Mon Aug 24 00:12:34 CEST 2009


On Sun, 23 Aug 2009 15:03:29 -0700
"Brian J. Tarricone" <brian at tarricone.org> wrote:

> On 08/23/2009 02:45 PM, Jannis Pohlmann wrote:
> > 
> > On Unixes one can create a GDesktopAppInfo from a filename and call
> > g_app_info_launch() with an empty file list to call a desktop file
> > without any arguments.
> > 
> > Here are two links to the API docs:
> > http://library.gnome.org/devel/gio/2.18/gio-Desktop-file-based-GAppInfo.html
> > http://library.gnome.org/devel/gio/2.18/GAppInfo.html
> > 
> > The launch() method takes a GAppLaunchContext argument. The
> > GAppLaunchContext interface is implemented by GdkAppLaunchContext
> > and that class allows to set things like display, screen and also a
> > timestamp to be used for startup notification:
> > 
> > http://library.gnome.org/devel/gdk/stable/gdk-Application-launching.html
> 
> Excellent.  The only thing possibly missing is handling of the
> Terminal= key.  And even if it's not missing, I imagine it doesn't
> run xfterm4 :-P . 

Nope, unfortunately, it only tries the following programs in order:

  gnome-terminal
  nxterm
  color-xterm
  rxvt
  xterm
  dtterm

That's pretty bad of course. Once again, I think we should push for a
standardization of preferred applications of certain types (browser,
email, terminal would be a good start).

  - Jannis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20090824/aa52b88c/attachment.pgp>


More information about the Xfce4-dev mailing list