From 890d7e3553b9813f8bed6d8b6d6757e618e0147b Mon Sep 17 00:00:00 2001 From: aaaawwWWWwwwwWWW <73749744+aaaawwWWWwwwwWWW@users.noreply.github.com> Date: Mon, 30 Nov 2020 10:42:28 -0300 Subject: [PATCH] xdg-mime: add page (#4998) --- pages/linux/xdg-mime.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/linux/xdg-mime.md diff --git a/pages/linux/xdg-mime.md b/pages/linux/xdg-mime.md new file mode 100644 index 000000000..7017f00cf --- /dev/null +++ b/pages/linux/xdg-mime.md @@ -0,0 +1,20 @@ +# xdg-mime + +> Query and manage MIME types according to the XDG standard. +> More information: . + +- Display the MIME type of a file: + +`xdg-mime query filetype {{path/to/file}}` + +- Display the default application for opening PNG images: + +`xdg-mime query default {{image/png}}` + +- Display the default application for opening a specific file: + +`xdg-mime query default $(xdg-mime query filetype {{path/to/file}})` + +- Set imv as the default application for opening PNG and JPEG images: + +`xdg-mime default {{imv.desktop}} {{image/png}} {{image/jpeg}}`