I recently switched to gnome3 and was surprised to find that there was no way by which we could set the default applications. I am writing a nautilus extension using bash. I want to find the mime type of a file.
Initially I used to extract the extension of the file using sed and build the code on it. Then I realized that there is this command called file. When I try to find the mime-type of a mkv file, the command file --mime-type -b <filename> outputs application/octet-stream but when I see the nautilus-properties window it shows the correct video/x-matroska mime-type.
Am I missing anything here?? If not is there a better way in which I can file the mime-type of a file? Thanks in advance :)