1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-28 23:17:58 +01:00

xdg-mime: add page (#4998)

This commit is contained in:
aaaawwWWWwwwwWWW 2020-11-30 10:42:28 -03:00 committed by GitHub
parent 4af919369e
commit 890d7e3553
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

20
pages/linux/xdg-mime.md Normal file
View file

@ -0,0 +1,20 @@
# xdg-mime
> Query and manage MIME types according to the XDG standard.
> More information: <https://portland.freedesktop.org/doc/xdg-mime.html>.
- 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}}`