Update file type associations under Linux

written on Friday, January 07, 2011 by

To update a file type (or rather a mime type) association under Linux, you can use the xdg-mime command.

$ xdg-mime default desktop-file mimetype

E.g. to open pdf files with evince, issue

$ xdg-mime default evince.desktop application/pdf

This entry was tagged sysadmin