[ubuntu-za] Strange Nautilus behaviour.

Raoul Snyman raoul.snyman at saturnlaboratories.co.za
Fri Dec 30 20:30:38 UTC 2011


On 30/12/2011 20:37, Peter Nel wrote:
> In linux file associations are based on "mime type" (the structure of
> the file contents) and not the file extension like .zip, .doc, etc.
> (with exceptions) as in windows (perhaps it was added to linux to make
> windows users feel at ease?).
>
> That's why you actually don't need the .xyz extension after a file
> (try it: create and save a new .odt document with LibreOffice, close
> LibreOffice, then delete the ".odt" file extension in the file name...
> Nautilus still recognizes it as and .odt file and will open it with
> LibreOffice when you open it. Cool huh :-)

Actually, that's not quite right. The mime types are a list of types of 
files (it's a text list), with all applicable file extensions associated 
with the mime type.

What happens on Linux is that the extension is first looked at to 
determine the mime type, and failing that, the file contents are studied 
to try to determine the file type. Of course this doesn't always work.

Péter, with your JAR files, you'll probably find that your default 
archive application is associated with them (because they are just zip 
files).

-- 
Raoul Snyman, B.Tech IT (Software Engineering)
Saturn Laboratories
m: 082 550 3754
e: raoul.snyman at saturnlaboratories.co.za
w: www.saturnlaboratories.co.za
b: blog.saturnlaboratories.co.za



More information about the ubuntu-za mailing list