I'm making a script which uses xfconf-query to change various system settings on mass, however I'm unsure how to set my Preferred Applications in the same manner.

enter image description here

I looked into the mimeapps.list file which gets generated in .config/ in the Home directory when you set your Preferred Applications via the GUI. File seems to generate a [Added Associations] section.

I created a new user account and placed my own mimeapps.list file in the .config directory in the hopes it might work, but no luck, unfortunately.

Would anyone know how I can set my Preferred Applications using a terminal command or method similar to xfconf-query?

Thank you in advance.


Haven't tried anything with it, but the xdg-mime tool looks promising. According to its man file, it includes a default command that can be used to "Ask the desktop environment to make application the default application for opening files of type mimetype."

  • Thank you for letting me know about the xdg-mime tool. I shall have a look and see if it works for my needs.
    – Hymcode
    2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.