Linux Commands Examples

A great documentation place for Linux commands


Get or set mime handlers

see also : gvfs-open


gvfs-mime --query {MIMETYPE}

gvfs-mime --set {MIMETYPE} {HANDER}

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !


gvfs-mime can query information about applications that are registered to handle a mime-type, or set the default handler for a mime-type.

Gvfs obtains this information from the shared-mime-info database. The default handler is stored per-user, in the file $XDG_DATA_HOME/applications/mimeapps.list.

MIMETYPE should be a mime-type such as text/plain or application/mbox. HANDLER should be the name of an existing desktop file such as gedit.desktop.


The following options are understood:

-h, --help

Prints a short help text and exits.


Query the handler for MIMETYPE.


Set the default handler for MIMETYPE to HANDLER.

exit status

On success 0 is returned, a non-zero failure code otherwise.



Shared MIME-Info specification

gvfs mime

see also

gvfs-open , Shared MIME-Info specification [1]

How can this site be more helpful to YOU ?

give  feedback