mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-20 11:01:50 +00:00
Update cheatsheets
This commit is contained in:
25
linux/xdg-mime
Normal file
25
linux/xdg-mime
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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 PNGs:
|
||||
|
||||
`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}}`
|
||||
Reference in New Issue
Block a user