We are making a Python application, and I need to provide the user with the "Open" menu. I am currently parsing /usr/share/applications/mimeinfo.cashe and ~/.local/share/applications/mimeapps.list , but with very poor results. Nautilus has more entries in the Open With menu.
Do you know the best way to get a list of applications related to a file?
Edit:
There is an easier way to use the gnomevfs module.
mime_type = gnomevfs.get_mime_type(filename) application_list = gnomevfs.mime_get_all_applications(mime_type)
In the returned list, you will receive the application name, icon name, configuration file and much more.
source share