You need to know two things about a file - what its MIME type is, and what application is set to run that file type.
You find out the first element by using the filename of a type you are interested in, in this command in terminal:
xdg-mime query filetype filewithatypeIaminterestedin.pdfThe output will look a bit like this:
application/pdf; charset=binaryFor our present purposes, the first part of the response is the important bit. It tells us that the MIME type is "application/pdf". You can now run the following to find out what application is set to run this:
xdg-mime query default application/pdfWhere "application/pdf" is obviously whatever was spat out by the previous command. The results of this command, should be a .desktop file. This is the file in /usr/share/applications which has all the important information about an application. To change this you run the following command:
xdg-mime default epdfview.desktop application/pdf
No comments:
Post a Comment