[opensuse] file extension specificity in linux
In message at http://lists.opensuse.org/opensuse/2016-02/msg01428.html Felix Miata wrote:
I tried LibreOffice, but its proprietary file picker refuses to recognize the .sxc file.
After reading this I decided to ask my question: Why certain linux applications accept or insist on using only specific file extensions? In unix/linux systems file types are/can be identified without the extension, therefore it makes working with these applications counterproductive. For example I would like to place on my desktop two playlist files, one opened by vlc, the other by audacious. I thought that by adjusting file associations I can set which playlist is opened by which application. I have renamed pls extensioin to pls2 and associated it with audacious. But audacious cannot open the file anymore saying: Error opening file, file format not recognized. This is obviously not true as only the file extension was changed. I don't understand it why the program is made like that. One of the strengths of linux that it doesn't require extension to identify file type. Why don't some linux applications make use of this opportunity? Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-02-29 19:15, Istvan Gabor wrote:
In message at http://lists.opensuse.org/opensuse/2016-02/msg01428.html Felix Miata wrote:
I tried LibreOffice, but its proprietary file picker refuses to recognize the .sxc file.
After reading this I decided to ask my question: Why certain linux applications accept or insist on using only specific file extensions? In unix/linux systems file types are/can be identified without the extension, therefore it makes working with these applications counterproductive.
Well, opening a directory full of documents and filtering on extension is simple and fast. It is not a bad idea. However, LibreOffice allows you to display all types, no filtering. Filtering by real type is slow. You have to open each file and examine its contents in order to decide its type, then remember it.
For example I would like to place on my desktop two playlist files, one opened by vlc, the other by audacious. I thought that by adjusting file associations I can set which playlist is opened by which application. I have renamed pls extensioin to pls2 and associated it with audacious. But audacious cannot open the file anymore saying: Error opening file, file format not recognized. This is obviously not true as only the file extension was changed. I don't understand it why the program is made like that.
One of the strengths of linux that it doesn't require extension to identify file type. Why don't some linux applications make use of this opportunity?
That's up to each application developer. I would report a bug against audacious or vlc. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Le 29/02/2016 19:15, Istvan Gabor a écrit :
After reading this I decided to ask my question: Why certain linux applications accept or insist on using only specific file extensions?
why do I have to open Windows to understand why some Firefox options are so? either some general thinking makes linux and Windows go in the same direction (?) or one is following the other... giving I (mostly) don't like the Windows changes...
For example I would like to place on my desktop two playlist files, one opened by vlc, the other by audacious.
this can be solved changing other part of the file name :-). But of course, I understand it's only an example. What do the command "file" says for that files?
One of the strengths of linux that it doesn't require extension to identify file type. Why don't some linux applications make use of this opportunity?
yes. I know I often use extensions in scripts, because I'm a lazy programmer and it's a visually friendly reminder. Computers should not rely on extensions, but human could. jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
jdd wrote:
Computers should not rely on extensions, but human could.
Exactly. -- Per Jessen, Zürich (1.8°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 29.02.2016 um 19:15 schrieb Istvan Gabor:
One of the strengths of linux that it doesn't require extension to identify file type. Why don't some linux applications make use of this opportunity?
File extensions often mean nothing on Linux. Most file dialogs have an option to show all files. There are a few applications, especially ones which also exist on Windows, which are more picky. They configure the file dialogs to just show specific files types, or, in the case of Open/LibreOffice, they replace the standard file dialogs with own versions. That sucks. The solution here: Just change the extension, so you can open the file. It's a cheap workaround that always works, and any other solution would be complex, brittle and expensive in comparison. Or you can try to start the application from the command line and feed it the file name there. That will allow you to pass any name and there won't be any extension filtering ... unless you have configured your shell to suggest only "valid" file types. In that case, you have to copy&paste the file name since tab completion will fail. It would be great if we had a file system like Mac where each file has to specify it's type in the metadata (along with the file name). But that's another can of worms. Regards, -- Aaron "Optimizer" Digulla a.k.a. Philmann Dark "It's not the universe that's limited, it's our imagination. Follow me and I'll show you something beyond the limits." http://blog.pdark.de/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/29/2016 02:58 PM, Aaron Digulla wrote:
here are a few applications, especially ones which also exist on Windows, which are more picky.
Its a yes-no-maybe situation Yes, we have the tools and the database to determine file type by examination, principally "file(1)" and the "magic numbers" in /usr/share/misc/magic. (See magic(5) for details) But there's a nasty gotcha in all this and its called "MIME". This, in turn, drags in lots of things like the desktop menu and dispatching. As you can see from the example in "man xdg-mime" its about the file extention, not the content. It is this, along with the "*.desktop" files, that determine how Linux "executes" a data file. If you choose to read this as a MS-DOS conspiracy, then I'm not going to argue with you. It all stems from the nasty habit of doing FTP-by-email. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Aaron Digulla
-
Anton Aylward
-
Carlos E. R.
-
Istvan Gabor
-
jdd
-
Per Jessen