Dolphin adds a txt extension to ini files

On 03/04/2014 06:56 PM, Fraser Bell pecked at the keyboard and wrote:
> kensch;2628654 Wrote:
>> But in linux we never used an extension to specify the content of a
>> file. Perhaps retraining windows converts is a better plan of attack.
>>
>> Ken
>
> Nope.
>
> Most of us want more Windows users to convert to openSUSE Linux.
>
> Thus, providing familiar methods to do things will make the switch more
> comfortable, less intimidating.
>
> They come here, they start using it in familiar ways, then the
> retraining takes place by osmosis.
>
> … and that way, fewer tend to go back.
>
>

Then it should be a configuration choice not rammed down our throats
like other changes lately. THIS IS NOT Windows, stop trying to make it
the same as Windows! If you want Windows features so badly go back to
Windows.

Ken

On 2014-03-05 00:14, Ken Schneider wrote:
> On 03/04/2014 04:53 PM, Carlos E. R. pecked at the keyboard and wrote:

>> This is a common usage pattern in Windows, many people use it. I used it
>> a lot when I used Windows. People expect to find those features in
>> Linux, too. You don’t use it, I almost do not use it, but many other
>> people do :slight_smile:
>>
>>
> But in linux we never used an extension to specify the content of a
> file. Perhaps retraining windows converts is a better plan of attack.

No, because the aim of both KDE and Gnome desktops is to get them on our
boat.

Try this:


mkdir somewhere
cd somewhere
touch some.pdf

now navigate with dolphin to that directory: you will see that
“some.pdf” with the PDF icon on it.

Now double click on it: you will how dolphin opens it with a pdf viever,
which in my case happens to still be acrobat.

Did you say something about Linux ignoring extensions? >:-P


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

for me using Dolphin 4.12.2

right click in empty directory > Create new > text file > new.ini

I get a file called new.ini

no txt extension added at all.

It’s attitudes like that have kept Linux down through the decades.

On 03/04/2014 07:53 PM, Carlos E. R. pecked at the keyboard and wrote:
> On 2014-03-05 00:14, Ken Schneider wrote:
>> On 03/04/2014 04:53 PM, Carlos E. R. pecked at the keyboard and wrote:
>
>>> This is a common usage pattern in Windows, many people use it. I used it
>>> a lot when I used Windows. People expect to find those features in
>>> Linux, too. You don’t use it, I almost do not use it, but many other
>>> people do :slight_smile:
>>>
>>>
>> But in linux we never used an extension to specify the content of a
>> file. Perhaps retraining windows converts is a better plan of attack.
> No, because the aim of both KDE and Gnome desktops is to get them on our
> boat.
>
> Try this:
>
>


> mkdir somewhere
> cd somewhere
> touch some.pdf
> 

>
> now navigate with dolphin to that directory: you will see that
> “some.pdf” with the PDF icon on it.
>
> Now double click on it: you will how dolphin opens it with a pdf viever,
> which in my case happens to still be acrobat.
>
> Did you say something about Linux ignoring extensions? >:-P
>
[RANT]
Good GOD, IN THE PAST the extension DID NOT specify the type of file,
the contents did.
Now that ex-MS people are using linux they want it mimic how “windows”
did it because MS wanted to keep people using extensions just like dos
did. What is going on is, programs are being modified to work the same
way it was handled in windows. Before long we will be stuck with having
to use an extension to specify the file type instead of the contents
dictating the contents. IT’S NOT THE RIGHT WAY TO DO IT! If people want
linux programs to be “just like windows does it” go fucking back to windows!
[/RANT]

Linux does know nothing about “extensions”. Some apllications interprete some suffixes and other applications interprete other suffixes. And may be you forgot that KDE/Gnome, etc. are (bunches of) applications, not Linux.

BTW when I “double click” on a file in Dolphin, I get it opened two times.
Double click is another of those Windows “features” some want to force upon X users. And this one has medical repercussions (RSI). I a fully with Kensch’s rant.

Same idiotic behaviour with copy/paste not using the mouse alone, but adding some unneeded and difficult keyboard combinations to it.

On 2014-03-05 09:36, hcvv wrote:
>
> robin_listas;2628670 Wrote:
>>
>>
>> Did you say something about Linux ignoring extensions? >:-P
>>
>>
> Linux does know nothing about “extensions”. Some apllications interprete
> some suffixes and other applications interprete about other suffixes.
> And may be you forgot that KDE/Gnome, etc. are (bunches of)
> applications, not Linux.

There is no “Linux” :stuck_out_tongue:

I was being ironic above, in case you did not notice. I’m very well
aware that traditionally Linux applications ignore extensions, and that
they are not enforced. However, many applications do use them (specially
modern apps,) and do not use at all the mechanism to decide file type
based on the magic database used by “file”.

But even some CLI apps use extensions in preference to file contents.
Notably Midnight Commander.

There is no “Linux”. Applications decide what they do. Dolphin does.

(They are redefining the Linux way every minute, any way…)

> BTW when I “double click” on a file in Dolphin, I get it opened two
> times.
> Double click is another of those Windows “features” some want to force
> upon X users. And this one has medical repercussions (RSI). I a fully
> with Kensch’s rant.

Well, I prefer to differentiate between double and single click. I find
it useful. But that is irrelevant. If you single click to open a file in
Dolphin (it is configurable, I believe), just try what I did in my
previous post. Create an empty file with a “.pdf” extension, which
obviously is not a PDF file, according to age old Linux standards, and
Dolphin will try to open it as if it were a PDF file. Just try it :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-03-05 05:17, Ken Schneider wrote:
> On 03/04/2014 07:53 PM, Carlos E. R. pecked at the keyboard and wrote:

> [RANT]
> Good GOD, IN THE PAST the extension DID NOT specify the type of file,
> the contents did.
> Now that ex-MS people are using linux they want it mimic how “windows”
> did it because MS wanted to keep people using extensions just like dos
> did. What is going on is, programs are being modified to work the same
> way it was handled in windows. Before long we will be stuck with having
> to use an extension to specify the file type instead of the contents
> dictating the contents. IT’S NOT THE RIGHT WAY TO DO IT! If people want
> linux programs to be “just like windows does it” go fucking back to
> windows!
> [/RANT]

ROTFL! X’-)

I understand you.

But this is nothing new. Midnight Commander, for instance, has done the
same since I tried it well over a decade ago. And it is a console program.

It is just faster to look at extensions than contents. Some file
browsers can be configured to use one or another method.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-03-05 05:06, farcusnz wrote:

> no txt extension added at all.

Well, then it either is configurable somewhere, or they changed the
defaults.

As I said, I have a strong feeling that there is a template folder
somewhere, or a database of new file definitions somewhere, where you
can adjust what “create new text file” does. And very possibly you can
also add new file types to it.

I’m not a KDE user, so I wouldn’t know where to search for it. But you
people that do use KDE all the time could try find out :wink:

It would surprise me a lot to learn that this is hardcoded.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-03-04, finders <finders@no-mx.forums.opensuse.org> wrote:
> flymail;2628572 Wrote:
> Quote the part where I was asking for help.

Very easy. Look at the header for this newgroup (from NNTP): Newsgroups: opensuse.org.help.applications. Note the
penultimate word.

> You just assume it’s my fault the app is doing this and suggest I should
> get some help?

It may or may not be your fault. But since you don’t even mention what version of openSUSE you use, the steps you took
to produce the problem, and ignore everyone’s suggestion of investigating the problem, perhaps it is your fault.

> Last time I mention any bug on this forum, I’ll just keep it shut from
> now on.

Good idea. This is a help forum. And don’t bother with Bugzilla either because your report would have been woefully
inadequate to help developers.

TBH I could just take that upstream, but I post here first because it might be some openSUSE specific feature.
I have seen these windows-like behaviors before, and they mostly come from build service and not upstream.

For example I asked one long time xfce user how to disable xfce4-panel mount plugin confirmation box?
Do you know what he said? He said xfce4-panel mount plugin doesn’t have a confirmation box.

Then I found out openSUSE branding adds a confirmation box so you need to click “OK” on every dismount.
If I had taken this abomination upstream, they would have laughed and sent me rigt back here.

So much for taking bugs upstream.
As for the .txt extension, it might just be an oversight, because it won’t ever add one to .sh files.

I can confirm that exact default behaviour for KDE and Dolphin 4.12.2 [on 13.1 based Tumbleweed], so someone at KDE agrees with the OP.

No .txt added for file name.ini, and the same is true without a suffix (.ini).

My understanding has always been that Linux relies on file content for Type, and not suffixes, leaving the user and application programs free to deploy them as part of filename.

IMO, openSUSE Project delivers a desktop operating system based on a linux kernel, where any changes in default behaviour should be notified upon release, or it should be regarded as a bug against the openSUSE release. You get to choose the DE component of that OS, for this thread it’s KDE SC 4, and Dolphin has always been a key component of the SC.

Arguably Dolphin is part of the desktop operating system. Any other file manager might be just another application program with different [default] behaviour, like any of the LibreOffice programs, i.e clearly not part of the operating system.

Personally, I prefer the default behaviour of operating system components to be consistent on arrival. By all means offer some configurable Windows-like alternatives in KDE, providing it doesn’t adversely affect the maintenance of core components such as Dolphin.

On 03/04/2014 11:26 PM, Fraser Bell pecked at the keyboard and wrote:
> kensch;2628664 Wrote:
>> On 03/04/2014 06:56 PM, Fraser Bell pecked at the keyboard and wrote:
>>> kensch;2628654 Wrote:
>>>> But in linux we never used an extension to specify the content of a
>>>> file. Perhaps retraining windows converts is a better plan of attack.
>>>>
>>>> Ken
>>> Nope.
>>>
>>> Most of us want more Windows users to convert to openSUSE Linux.
>>>
>>> Thus, providing familiar methods to do things will make the switch
>> more
>>> comfortable, less intimidating.
>>>
>>> They come here, they start using it in familiar ways, then the
>>> retraining takes place by osmosis.
>>>
>>> … and that way, fewer tend to go back.
>>>
>>>
>> Then it should be a configuration choice not rammed down our throats
>> like other changes lately. THIS IS NOT Windows, stop trying to make it
>> the same as Windows! If you want Windows features so badly go back to
>> Windows.
>>
>> Ken
> It’s attitudes like that have kept Linux down through the decades.
>
>

No, quite the opposite. Linux has always been about choice, Why do you
think we have many different apps that do the same thing? CHOICE!
I chose to use KDE, it’s my choice to make no one elses. And if it stops
providing what I want in a desktop I have the choice to use a
different DE.

On 03/05/2014 04:48 AM, Carlos E. R. pecked at the keyboard and wrote:
> On 2014-03-05 09:36, hcvv wrote:
>> robin_listas;2628670 Wrote:
>>>
>>> Did you say something about Linux ignoring extensions? >:-P
>>>
>>>
>> Linux does know nothing about “extensions”. Some apllications interprete
>> some suffixes and other applications interprete about other suffixes.
>> And may be you forgot that KDE/Gnome, etc. are (bunches of)
>> applications, not Linux.
> There is no “Linux” :stuck_out_tongue:
>
> I was being ironic above, in case you did not notice. I’m very well
> aware that traditionally Linux applications ignore extensions, and that
> they are not enforced. However, many applications do use them (specially
> modern apps,) and do not use at all the mechanism to decide file type
> based on the magic database used by “file”.
>
> But even some CLI apps use extensions in preference to file contents.
> Notably Midnight Commander.
>
> There is no “Linux”. Applications decide what they do. Dolphin does.
>
> (They are redefining the Linux way every minute, any way…)
>
>> BTW when I “double click” on a file in Dolphin, I get it opened two
>> times.
>> Double click is another of those Windows “features” some want to force
>> upon X users. And this one has medical repercussions (RSI). I a fully
>> with Kensch’s rant.
> Well, I prefer to differentiate between double and single click. I find
> it useful. But that is irrelevant. If you single click to open a file in
> Dolphin (it is configurable, I believe), just try what I did in my
> previous post. Create an empty file with a “.pdf” extension, which
> obviously is not a PDF file, according to age old Linux standards, and
> Dolphin will try to open it as if it were a PDF file. Just try it :slight_smile:
>

Going further take a real pdf file and change the ending to .txt and
open in dolphin and see what you get. Notice I did not say extension as
there are no extensions, just file names. some.file.txt.pdf.script is
just a file name NOT a file type.

Ken

On 2014-03-05 14:06, finders wrote:
>
> robin_listas;2628622 Wrote:

> TBH I could just take that upstream, but I post here first because it
> might be some openSUSE specific feature.
> I have seen these windows-like behaviors before, and they mostly come
> from build service and not upstream.

It could be.

> So much for taking bugs upstream.

I typically report directly on openSUSE Bugzilla, and then I take it
upstream if they tell me so, and I have the time to do so.

> As for the .txt extension, it might just be an oversight, because it
> won’t ever add one to .sh files.

Well, as I said, I have the strong guess that there is a database or
folder or configuration somewhere in KDE where you create the
definitions of what are going to happen when you select “create new
file”. You should be able to create new definitions (like a new one for
“create ini file”). And it is probably user or admin adjustable.

I don’t know where it is, nor even 100% sure that it is accessible.

If it doesn’t, it is a feature waiting for some one to develop.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-03-05 14:40, Ken Schneider wrote:
> On 03/05/2014 04:48 AM, Carlos E. R. pecked at the keyboard and wrote:

> Going further take a real pdf file and change the ending to .txt and
> open in dolphin and see what you get. Notice I did not say extension as
> there are no extensions, just file names. some.file.txt.pdf.script is
> just a file name NOT a file type.

Good idea.

Wait.

…]

It opens it in gedit… which just displays a blank page, without
finishing the download or displaying an error. …] No, wait, it took
some time, then it displays an error, about the file being corrupt or
having invalid characters.

ROTFL! :stuck_out_tongue:

(yes, I know that Linux doesn’t know what an extension is, you don’t
have to explain me that. BUT, dolphin does.)


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-03-05 14:36, consused wrote:

> My understanding has always been that Linux relies on file content for
> Type, and not suffixes, leaving the user and application programs free
> to deploy them as part of filename.

That has been the general tradition, yes.

In traditional FAT filesystems, there were 8 chars for the name, and 3
for the extension. No choice at all to just use all letters for the name
with no extension. The dot was not really stored, but assumed. The
operating system and libraries had functionalities to act on extensions
and do things with them. Windows inherited on that, and always (AFAIK)
checks the extension to find out what to do with a file.

Linux did not have that. If you wrote a filename with a extension, it
was in fact a name with a dot somewhere. The dot is another character.

(current Windows filesystems do the same, there is no separate extension
saved).

And, most apps detected the file type by examining contents before
trying to open them this or that way, disregarding the extension.

But there have been exceptions since long ago. For instance, the
Midnight Commander heeds extensions, not contents, since ever, way over
a decade ago.

It is up to the applications to adhere to the Linux tradition of
ignoring extensions or not.

IMHO, Dolphin heeds extensions and not real file type intentionally. By
design.

And Nautilus does the same, I just tried.

I copied a real PDF file and renamed it as a.txt file. Click open, and
it is opened with leafpad, a text editor.

I click open a zero bytes file.pdf, and attempts to open it with Evince…

The column “Mime type” when I select “view details” identifies the false
text file as text (it is a pdf with .txt extension).

However, the “spreadsheet document” with no extension is correctly
identified and opened with LO. If I remove the extensions from the
names, the other files are also correctly identified.

So, nautilus first heeds the extension, and if it does not exist, then
checks contents.

This is no bug, it is intentional design by current Linux developers. No
tradition anymore. >:-P


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 03/05/2014 01:38 PM, Carlos E. R. pecked at the keyboard and wrote:
> On 2014-03-05 14:40, Ken Schneider wrote:
>> On 03/05/2014 04:48 AM, Carlos E. R. pecked at the keyboard and wrote:
>
>> Going further take a real pdf file and change the ending to .txt and
>> open in dolphin and see what you get. Notice I did not say extension as
>> there are no extensions, just file names. some.file.txt.pdf.script is
>> just a file name NOT a file type.
> Good idea.
>
> Wait.
>
> …]
>
> It opens it in gedit… which just displays a blank page, without
> finishing the download or displaying an error. …] No, wait, it took
> some time, then it displays an error, about the file being corrupt or
> having invalid characters.
>
> ROTFL! :stuck_out_tongue:
>
>
> (yes, I know that Linux doesn’t know what an extension is, you don’t
> have to explain me that. BUT, dolphin does.)
>

Yes, it knows what the “extension” is supposed tell what the contents
are, but in the end it is ultimately the contents that have final say. :wink:

Ken

There is in KDE a large table in Configure desktop-File association were you can pair an extension to an app. This is a KDE feature not a Linux feature.

Then the “be like Widows” argument must be obsolete. :wink:

But there have been exceptions since long ago. For instance, the
Midnight Commander heeds extensions, not contents, since ever, way over
a decade ago.

So, it’s just another file manager application that isn’t part of KDE SC.

It is up to the applications to adhere to the Linux tradition of
ignoring extensions or not.

I don’t consider KDE SC’s core components to be “just another application”, certainly not when being asked to “Create New File” with or without .ext in its filename. It shouldn’t be appending anything to the filename as typed in by the user! **It doesn’t on the 4.12.2 release of KDE SC, and didn’t before 4.11.x.
**

IMHO, Dolphin heeds extensions and not real file type intentionally. By design.

So what if it respects .ext in an existing filename? Personally I don’t create new files with .ext’s in the name that might influence Type, even if some applications still do.

My post was made within the strict context of this thread, as in the rather specific title. I don’t recall the OP asking for a full CRUD analysis of Dolphin’s behaviour or that of any other file manager, but don’t let that get in your way… :sarcastic: