Re: What API or tool to search mime association?

On Tue, 2006-06-20 at 15:24 -0300, Augusto Arcoverde da Rocha wrote:
> Hi all,
> I'm trying to integrate a mime database with WineTools or Wine itself,
> like CrossOver already does for GNOME, to launch a Linux application
> from the Wine environment associated with the mime type.

If you just want to launch the default app for a file, use
gnome_vfs_url_show(). You could also use lower level APIs like

> The gconftool seems to be this tool, but I didn't find a clear way to
> retrieve such information using it. How to use gconftool to get file
> extensions associated to it's mime types and the default action
> associated to a mime type?

gconftool is not involved with the mimetype association.

> Most of the references about the association between an action and a
> mime types point to gnome-vfs, but it's an API and seems to be
> deprecated, despite the fact of  being the nautilus core.

Where did you see gnome-vfs being deprecated?

> No command line tool seems to query mime types, file extensions and
> the launch action from a script. In API level, gnome-vfs looks like an
> easy option, but the GConf is claimed to me more powerful and
> flexible, supporting integration with other environments like KDE.

If you want to do this from a script, you should use gnome-open.

GConf supporting integration with KDE? That sounds very strange. GConf
is the API gnome apps use to store preferences. 

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a leather-clad Catholic cat burglar plagued by the memory of his family's 
brutal murder. She's a supernatural mute angel who inherited a spooky stately 
manor from her late maiden aunt. They fight crime! 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]