1
vote
2answers
168 views

How to get Icon-Names for MIME-types in a bash script?

is there a way to convert the output of file --mime-type FILE e.g. "application/pdf" into an icon-name, depending on the current icon-theme, or even a full link? Where is that specified? I ...
4
votes
2answers
443 views

Script to find executable based on extension of a file?

I need to create a script that returns the default app to be used for a given file extension (including the path). I had a look at the file command which can return the mime type and xdg-open which ...
0
votes
2answers
2k views

How do I determine the Mime type of a file?

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 ...