caja incorrect mime type detection

Bug #1106764 reported by Heiko Sieger
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux Mint
New
Undecided
Unassigned

Bug Description

1) Linux Mint 14 Nadja MATE 64 bit

2) In some circumstances caja detects/presents the wrong mime type for a file. Most notable is the /boot/vmlinuz-3.5.0-17-generic or any other kernel file which is detected as "application/x-dosexec" type and displayed with a MS Windows icon, which is quite embarrassing.

Open /boot in caja (icon mode). The vmlinuz-... file will be displayed with a MS Windows icon.

Important: In order to reproduce the bug, one needs "read" permission for the file, else it will display as a "regular file" (see below). In that case open /boot with caja in administrator mode.

Here a little test using the "file" command:

$ file -i vmlinuz-3.5.0-*
vmlinuz-3.5.0-17-generic: application/octet-stream; charset=binary
vmlinuz-3.5.0-22-generic: regular file, no read permission

$ file -i -k vmlinuz-3.5.0-*
vmlinuz-3.5.0-17-generic: application/x-dosexec; charset=binary
vmlinuz-3.5.0-22-generic: regular file, no read permission

file runs up to 3 tests to determine the mime type. Without the -k option file will exit once a test was successful in detecting the mime type. With the -k option file will continue testing, completing all 3 tests and printing the result of the last test that succeeded (with the -i option).

Caja behaves as if it was using file -k -i ... instead of file -i ...

3) Caja displays and reports (Properties dialog) incorrect mime type for vmlinuz kernel image and associates the wrong icon and program to launch.

4) Caja should use the first detected mime type as with file -i <file name> (that is without the "-k" option).

Here is the detailed output of "file vmlinuz-3.5.0-17-generic":

$ file vmlinuz-3.5.0-17-generic
vmlinuz-3.5.0-17-generic: Linux kernel x86 boot executable bzImage, version 3.5.0-17-generic (buildd@allspice) #28-Ubuntu SMP Tue Oct 9 19:, RO-rootFS, swap_dev 0x4, Normal VGA

For comparison, here the detailed output of "file -k vmlinuz-3.5.0-17-generic":

$ file -k vmlinuz-3.5.0-17-generic
vmlinuz-3.5.0-17-generic: Linux kernel x86 boot executable bzImage, version 3.5.0-17-generic (buildd@allspice) #28-Ubuntu SMP Tue Oct 9 19:, RO-rootFS, swap_dev 0x4, Normal VGA PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows\012- x86 boot sector, code offset 0x5a

5) The problem is reproducible.

I don't know if this is a cosmetic issue, or if this bug has further implications on how caja detects and associates mime types.

Revision history for this message
Heiko Sieger (h-sieger) wrote :

Attached is a screen shot showing the issue.

description: updated
Revision history for this message
Tsu Jan (tsujan2000) wrote :

Also see here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680175

They don't pay enough attention to this issue perhaps because it isn't shown with an icon set that doesn't distinguish between application-x-executable and application-x-ms-dos-executable.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.