[opensuse-kde] KDE file type detection
When I remove e.g. the .odt extension from a file, KDE still recognizes it as an Open Document file. So, am I right this means KDE also uses Linux´ magic numbers system to detect file types? Malte -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
On Tuesday 21 Jun 2011 16:25:08 Malte Gell wrote:
When I remove e.g. the .odt extension from a file, KDE still recognizes it as an Open Document file. So, am I right this means KDE also uses Linux´ magic numbers system to detect file types?
Malte
I don't know the answer to your question, but I have observed that Libre Office cannot find files which do not have an .od? extension, even though though are perfectly respectable odf files. Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.4 64-bit, Kernel 2.6.37.6-0.5-desktop, KDE 4.6.3 Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
Am 21.06.2011 17:52, schrieb Bob Williams:
I don't know the answer to your question, but I have observed that Libre Office cannot find files which do not have an .od? extension, even though though are perfectly respectable odf files.
I have observed that my LibreOffice can. But Windows can´t. thanks -- Kim Leyendecker (kdl@k-dl.de.vu) openSUSE Ambassador, openSUSE Wiki Team DE HAVE A LOT OF FUN! http://www.opensuse.org Have you tried SUSE Studio? Need to create a Live CD, an app you want to package and distribute or create your own Linux distro. Give SUSE Studio a try. http://www.susestudio.com -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
On Tuesday 21 Jun 2011 17:43:33 Kim Leyendecker wrote:
Am 21.06.2011 17:52, schrieb Bob Williams:
I don't know the answer to your question, but I have observed that Libre Office cannot find files which do not have an .od? extension, even though though are perfectly respectable odf files.
I have observed that my LibreOffice can. But Windows can´t.
thanks
Curious... On closer inspection, it seems to depend on Tools > Options > LibreOffice > General > Open/Save dialogue boxes > Use LibreOffice dialogue boxes. Setting that option allows it to see files without an extension. Interesting. Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.4 64-bit, Kernel 2.6.37.6-0.5-desktop, KDE 4.6.3 Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
Am 21.06.2011 19:54, schrieb Bob Williams:
Curious...
On closer inspection, it seems to depend on
Tools> Options> LibreOffice> General> Open/Save dialogue boxes> Use LibreOffice dialogue boxes.
Setting that option allows it to see files without an extension.
Well, I ordered openSUSE preinstalled on my new machine. Maybe they chnaged some cinfiguration on their own, because they offers you "a Linux system which could be use right now after plug in". === Test on a fresh installation with the openSUSE 11.4 Box by open-slx === Nope. You still can open documents which leave out the .odt-suffix. hope this helps, -- Kim Leyendecker (kdl@k-dl.de.vu) openSUSE Ambassador, openSUSE Wiki Team DE HAVE A LOT OF FUN! http://www.opensuse.org Have you tried SUSE Studio? Need to create a Live CD, an app you want to package and distribute or create your own Linux distro. Give SUSE Studio a try. http://www.susestudio.com -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
On Wednesday 22 Jun 2011 18:16:45 Kim Leyendecker wrote:
Am 21.06.2011 19:54, schrieb Bob Williams:
Curious...
On closer inspection, it seems to depend on
Tools> Options> LibreOffice> General> Open/Save dialogue boxes> Use LibreOffice dialogue boxes.
Setting that option allows it to see files without an extension.
Well, I ordered openSUSE preinstalled on my new machine. Maybe they chnaged some cinfiguration on their own, because they offers you "a Linux system which could be use right now after plug in".
=== Test on a fresh installation with the openSUSE 11.4 Box by open-slx ===
Nope. You still can open documents which leave out the .odt-suffix.
hope this helps,
Have you got the option I mention above _unset_? i.e. no tick/checkmark in the box. Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.4 64-bit, Kernel 2.6.37.6-0.5-desktop, KDE 4.6.3 Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
On 21 June 2011 16:25, Malte Gell <malte.gell@gmx.de> wrote:
When I remove e.g. the .odt extension from a file, KDE still recognizes it as an Open Document file. So, am I right this means KDE also uses Linux´ magic numbers system to detect file types?
If I remember correctly the KDE library has methods to only use the extension (well, any globbing), or only the magic number. But in general it should use this: http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec... or something very similar. -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
On Tuesday 21 Jun 2011 17:25:08 Malte Gell wrote:
When I remove e.g. the .odt extension from a file, KDE still recognizes it as an Open Document file. So, am I right this means KDE also uses Linux´ magic numbers system to detect file types?
Yes. -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
Will Stephenson <wstephenson@suse.de> wrote
On Tuesday 21 Jun 2011 17:25:08 Malte Gell wrote:
When I remove e.g. the .odt extension from a file, KDE still recognizes it as an Open Document file. So, am I right this means KDE also uses Linux´ magic numbers system to detect file types?
Yes.
Interesting. On the other hand you can fool KDE by changing the extension, when I change the .odt to .jpg KDE thinks it´s an image, it does not do a double check whether the extension is correct so you can fool KDE with a wrong extension. Malte -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
On 22/06/11 15:08, Malte Gell wrote:
Will Stephenson<wstephenson@suse.de> wrote
On Tuesday 21 Jun 2011 17:25:08 Malte Gell wrote:
When I remove e.g. the .odt extension from a file, KDE still recognizes it as an Open Document file. So, am I right this means KDE also uses Linux´ magic numbers system to detect file type Yes. Interesting. On the other hand you can fool KDE by changing the extension, when I change the .odt to .jpg KDE thinks it´s an image, it does not do a double check whether the extension is correct so you can fool KDE with a wrong extension.
Malte
Look in /usr/share/mime to understand how Linux determines file types. It can be determined via the first few bits or filename globbing and the different rules have different priorities. So in some cases changing the filename extension will fool the DE, in some cases it won't, depends on the specific filetype. (This is not in any way KDE specific) Regards, Tejas -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
participants (6)
-
Bob Williams
-
Cristian Morales Vega
-
Kim Leyendecker
-
Malte Gell
-
Tejas Guruswamy
-
Will Stephenson