Difference between revisions of "Mime"
From Blue-IT.org Wiki
(Created page with "= 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 [...] $...") |
(→Mime types under Linux) |
||
Line 17: | Line 17: | ||
$> xdg-mime query default application/pdf | $> xdg-mime query default application/pdf | ||
AdobeReader.desktop | AdobeReader.desktop | ||
+ | |||
$> xdg-mime default kde-kpdf.desktop application/pdf | $> xdg-mime default kde-kpdf.desktop application/pdf | ||
+ | |||
$> xdg-mime query default application/pdf | $> xdg-mime query default application/pdf | ||
kde-kpdf.desktop | kde-kpdf.desktop |
Revision as of 16:21, 5 January 2012
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