sascha-w
8/23/2017 - 4:09 PM

From https://wiki.archlinux.org/index.php/default_applications

# determine a file's MIME type
$ xdg-mime query filetype photo.jpeg
image/jpeg

# determine the default application for a MIME type
$ xdg-mime query default image/jpeg
gimp.desktop

# change the default application for a MIME type
$ xdg-mime default feh.desktop image/jpeg

# open a file with its default application
$ xdg-open photo.jpeg

# shortcut to open all web MIME types with a single application
$ xdg-settings set default-web-browser chromium.desktop

# shortcut for setting the default application for a URL scheme
$ xdg-settings set xchatdefault-url-scheme-handler weechat.desktop