Author(s): Renato Sanchez
Published on Sat Feb 01 2025
Summary: how to set default apps for specific mime types in linux
Use the following command to check the filetype of the file in question:
mimetype foo.jpg
Then look for the .desktop file of the app that you need as default for that type of file:
ls /usr/share/applications
Finally set the .desktop file with the following command:
# Setting ristretto as default image viewer for example:
xdg-mime default org.xfce.ristretto.desktop image/jpeg