2013-01-27 09:54:28 |
Heiko Sieger |
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. |
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. |
|