Set default application for MIME type with xdg-mime

Revision history
Tags: arch linux xdg-mime mime

My JSON and other plain text files were opening in Libre Office after I installed it. That is not something I appreciate. Here’s how to change it to something else using xdg-mime.

See what is opening plain text files right now

$ xdg-mime query default text/plain

See a list of available applications

$ ls /usr/share/applications

Change default application

$ xdg-mime default mousepad.desktop text/plain


If you have any comments or feedback, please send me an e-mail. (stig at stigok dotcom).

Did you find any typos, incorrect information, or have something to add? Then please propose a change to this post.

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.