Am making an application in Python and I need to provide "Open with" menu to user. Currently I am parsing /usr/share/applications/mimeinfo.cashe
and ~/.local/share/applications/mimeapps.list
but with very poor results. Nautilus has more entries in "Open with" menu.
Do you know a better way for getting list of applications associated with file?
Edit:
There is a simpler way using gnomevfs
module.
mime_type = gnomevfs.get_mime_type(filename)
application_list = gnomevfs.mime_get_all_applications(mime_type)
In returned list you get application name, icon name, config file and many other stuff.