gvfs-mime
Set or get default application for MIME type
SYNOPSIS
gvfs-mime [options]
PARAMETERS
--help
Display help information and exit.
--version
Display version information and exit.
query
Query the default application for the given MIME type.
set
Set the default application for the given MIME type to the specified .desktop file.
default
Set
--xdg-desktops-dir
output the XDG user desktops directory
--list
List registered applications
DESCRIPTION
gvfs-mime is a command-line utility that allows you to query and manipulate the default applications associated with specific MIME types within the GVFS (GNOME Virtual File System) framework. It provides functionality similar to 'xdg-mime' but interacts specifically with GVFS's settings and infrastructure.
With gvfs-mime, you can determine the default application for opening a particular file type, set a new default application, and query supported applications for a given MIME type. This is useful for managing how your system handles different file types, ensuring that the applications you prefer are used to open them.
The command primarily interacts with the user's preferences, impacting how files are opened within the GNOME desktop environment and applications utilizing GVFS for file access. The settings are stored and managed by GVFS. It's a crucial tool for customizing your desktop experience.
CAVEATS
The application specified by
DESKTOP FILES
The .desktop
files referenced by gvfs-mime
are crucial for associating applications with MIME types. These files typically reside in /usr/share/applications
or ~/.local/share/applications
. They define the application's name, icon, command-line arguments, and, importantly, the MIME types it supports. The MimeType=
key in the .desktop
file specifies the supported MIME types as a semicolon-separated list. Ensure the specified MIME types are accurate and relevant to the application's capabilities.
EXAMPLES
To query the default application for opening PDF files:gvfs-mime query application/pdf
To set Evince as the default application for PDF files:gvfs-mime set application/pdf org.gnome.Evince.desktop
HISTORY
gvfs-mime is part of the GVFS project, which was created to provide a modular virtual file system layer for GNOME. It evolved alongside GVFS to manage MIME type associations specifically within the GVFS framework. Its use has increased as GVFS became more integrated into the GNOME desktop environment and other applications relying on GVFS for file system access.