Mime

From Blue-IT.org Wiki

Revision as of 16:21, 5 January 2012 by Apos (talk | contribs) (Mime types under Linux)

Mime types under Linux

$> man  xdg-mime
xdg-mime - command line tool for querying information about file type handling and adding descriptions for new file types
[...]
$> man  xdg-open
xdg-open - opens a file or URL in the user's preferred application
[...]

You can open any file with the default xdg-open command:

$> xdg-open special_file.pdf

Setting the default type is easy:

xdg-mime default
$> xdg-mime query default application/pdf
AdobeReader.desktop

$> xdg-mime default kde-kpdf.desktop application/pdf

$> xdg-mime query default application/pdf
kde-kpdf.desktop