Version: 1.4 (using 4.4.2 (KDE 4.4.2), Kubuntu packages)
OS: Linux (x86_64) release 2.6.32-21-generic
When you change the icon of a folder and switch on hidden files in that directory, the handling of the created .directory file is odd: Instead of a general icon, the Icon referenced from the file is displayed so it looks like you've actually got another hidden directory (if you chose an Icon resembling a folder).
Even worse: If you click on that file, it isn't opened with KWrite or something, but instead you get the error 'The desktop entry file /path/to/.directory has no Type=... entry.'
So it looks like I've got a hidden directory which I can't open and if I didn't know what a 'desktop entry file' is and what these hidden files are used for, I guess I'd feel even more like WTF?
Thanks for the report, but I cannot reproduce this issue with KDE SC 4.5.0. Please reopen the report, if it still occurs in your environment.
Nope, this is still present in KDE 4.5.0. I'll attach a screenshot to show what I mean.
KDE Development Platform: 4.5.00 (KDE 4.5.0)
Created attachment 51054 [details]
Screenshot showing a non-existent green directory and the error message.
Strange... Would it be possible that you provide step-by-step instructions how to reproduce this issue? I changed the icon of a folder and switched on hidden files in that directory, but cannot reproduce this issue.
Created attachment 51061 [details]
Of course. I also attached the generated .directory file.
1. Go to ~
2. Select File->Create New->Folder
3. Name it Test or whatever you like
4. Change into that (empty) folder
5. Enable View->Show Hidden Files (the .directory file is created)
6. Disable View->Preview
7. Right-Click into the white empty folder space, chose Properties
8. Click the icon to change the folders icon
9. Watch how the .directory file changes its icon, too
10. Click on that file and enjoy the error message :)
I also went into the File Associations KCM to find out what the default command for this should be. According to the properties is this a "desktop configuration file". When I type that into the search field, all I get with that description is application/x-desktop.
But that MIME type has only the extensions *.desktop and *.kdelnk associated. And the Application Preference order is Kate, KWrite, OpenOffice.org Word Processor (WTF?).
Dunno whats going on here.
Should bug 194253 be merged into this report?
Resetting assignee to default as per bug #305719
*** Bug 194253 has been marked as a duplicate of this bug. ***
This is because dolphin doesn't create valid a desktop entry.
Every .directory file should have a Type= and a Name= key.
Looks like the code is in viewproperties.cpp if somebody wants to try.
Thanks Maarten for the information, and sorry for the late response. According to the specification, the valid values for the "Type" are Application, Link and Directory. If I add a "Type=..." line to the "[Desktop Entry]" group, I can never achieve that clicking the file results in opening it in KWrite, no matter if there is a "Name=..." line or not (tested with KDE SC 4.13.3 - note that no source code modification is needed at all for testing this because one can simply edit the .directory file in a text editor):
For the type "Directory", I get an error message "The desktop entry of type Directory is unknown".
For the type "Link", I get "The desktop entry file ... is of type Link but has no URL=... entry.".
For the type "Application", nothing happens when clicking the .directory file.
So I don't see what we can do about this problem, sorry about that.
Note that the [Desktop Entry] group in the .directory file is actually not created by Dolphin at all. This is done by the Properties dialog, which is part of kdelibs. Without this group, the .directory file is just a regular text file, which can be opened just fine by clicking it.
So I am not sure what to do with this report. Unless anyone has a good idea, we should probably reassign it to KIO (which could just treat the file as a text file instead of showing the error messages) or close it as WONTFIX (since we do not have a CANTFIX state).
I'll reassign to KIO, where the error dialogs probably come from. I don't see anything we can do in Dolphin itself to fix this problem.
Thank you for looking into this.
I have patch for kio that I'll post soon. With my patch kio is able to handle .directory files as expected.
The only remaining issue is that it has the same icon as the parent folder. I have not looked into solving that.
Git commit 76eeb6a21c7553d65e02366837c742c1c91d295b by Maarten De Meyer.
Committed on 21/08/2014 at 13:02.
Pushed by demeyer into branch 'master'.
Open .directory files as plain text.
We cannot execute .directory files so we have to trick KRun in opening
them as plain text.
M +5 -0 src/widgets/kdesktopfileactions.cpp
Can't reproduce any of the issues described in the original ticket with KDE Frameworks 5.45 and Dolphin 18.04.