I tried changing default application used to open specified file types using
gnomevfs.mime_s开发者_开发技巧et_default_application(mime_type, application_id)
What I received was this warning: libgnomevfs-WARNING **: Deprecated function. User modifications to the MIME database are no longer supported.
Since I am making a file manager I really need to be able to change this as a part of file/directory properties dialog. Is there a way around it, how Nautilus does this without asking for additional priviledges?
You probably should just invoke xdg-mime
from the xdg-utils package. Syntax:
xdg-mime query default mimetype
xdg-mime default application.desktop mimetype
精彩评论