LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xdg-mime

Query and manage MIME type associations

TLDR

Display the MIME type of a file
$ xdg-mime query filetype [path/to/file]
copy
Display the default application for opening PNGs
$ xdg-mime query default image/png
copy
Display the default application for a file's MIME type
$ xdg-mime query default $(xdg-mime query filetype [path/to/file])
copy
Set an application as default for specific MIME types
$ xdg-mime default [imv.desktop] image/png image/jpeg
copy

SYNOPSIS

xdg-mime command [arguments]

DESCRIPTION

xdg-mime queries and manages MIME types according to the XDG (freedesktop.org) standard. It can detect file types, query default applications, and set application associations.The tool integrates with the desktop environment's MIME type handling, storing user preferences in ~/.config/mimeapps.list.

PARAMETERS

query filetype _file_

Display the MIME type of a file
query default _mimetype_
Display the default application for a MIME type
default _application_ _mimetype_...
Set default application for MIME types
install _mimetypes-file_
Install a MIME type definition
uninstall _mimetypes-file_
Uninstall a MIME type definition

INSTALL

sudo dnf install xdg-utils
copy
sudo pacman -S xdg-utils
copy
sudo apk add xdg-utils
copy
sudo zypper install xdg-utils
copy
nix profile install nixpkgs#xdg-utils
copy

CAVEATS

Application associations use .desktop file names. Changes may require restarting applications to take effect. Works with XDG-compliant desktop environments.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid