How do I tell Nautilus to use application based on file content instead of extension

Asked by wim sturkenboom

I need / like Nautilus to determine the file type based on the content of the file (similar to the file command) and not on the extension and base the decision which program to use (when the file is double-clicked) to open the file on that.

E.g. I have a picture called screenshot.txt (call me an idiot but that is how it is) and nautilus should open it with an image-viewer (e.g. EOG) and not with a text editor (e.g. gedit). If the picture was simply called screenshot (without an extension), nautilus behaves correctly and uses an imageviewer.

How do I achieve this?

Ubuntu 10.04 and 12.04, basically standard installs, both up-to-date

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Solved by:
wim sturkenboom
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I suggest you report a bug. Happens here too in Raring (Ubuntu 13.04) too

Revision history for this message
wim sturkenboom (wim001) said :
#2