[Thunar-dev] mime-types detection

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Tue Jan 17 13:55:11 CET 2006


samuel verstraete wrote:
> hi,
> 
> I'm presenting you a problem i have with *all* file managers i tried
> uptill now...
> 
> I'm working in a scientific sector and all our raw data (which are
> just text files) come overhere as .dat file (dat like in data, pretty
> logical... for a scientist like myself)
> 
> Now of course i know that files with a .dat extension are supposed to
> be mpeg files (format/containers ,whatever)
> 
> But i thought that thunar was reading some kind of file header to
> detect the file type instead of just checking the file extension?
> 
> Cause right now it is of course trying to open this thing with a movie
> program (xfmedia/totem/mplay/gxine) which is of course totally
> unvalid....
> 
> Not really sure what the question is but... any reactions on this?
> 
> (btw i tried nautilus, xfffm, rox and thunar :) )

Thunar won't check the content if a known extension is found (else it
would be too slow to load large directories, possibly from slow media).
The .dat entry in the shared-mime-info database was discussed some time
ago on the xdg mailinglist, since it's problematic to associate .dat
with mpeg video (most of these files aren't mpegs at all). Don't
remember the result of that discussion tho. IMHO, the proper way to fix
this would be to remove the .dat match from the shared-mime-info
database completely and force file manager to do content sniffing on
.dat files.

> gr,S.

Benedikt



More information about the Thunar-dev mailing list