Bug 366057

Summary: creation/modification of .desktop application links is broken
Product: [Plasma] plasmashell Reporter: kdebugs
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED WORKSFORME    
Severity: normal CC: bshah, herzenschein, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.6.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot of error message

Description kdebugs 2016-07-24 20:56:29 UTC
Observed on current Manjaro - multiple computers.  There are various problems even beyond what I describe, but until the basics are fixed, it's not worth describing.  Apologies if I've selected the wrong component - I'm not sure how all these things work together.

Reproducible: Always

Steps to Reproduce:
0. Delete ~/.local/share/applications directory as if you'd started with a new profile.  Close and re-open dolphin just to be sure.
1. Right-click in a folder and click Create New -> Link to Application...
2. Press OK.  File is created: "Link to Application.desktop"
3. Right-click file and select Properties.
4. Click blank icon and select an icon, e.g. the smiley face.  Click OK.

Actual Results:  
Get message box popup: "Sorry -- Dolphin" : "Could not save properties.  You do not have sufficient access to write to /home/[user name]/.local/share/applications/p."

At this time there is no .local/share/applications directory.  After you press OK, it will be created, along with a file named simply "p", the contents of which are:
[Desktop Entry]
Icon=face-smile


Expected Results:  
I don't know the rationale behind the .local/share/applications directory, so I don't know what to expect, but it does seem rather worthless to create that 'p' file, and doesn't make sense why, if you go on to change the .desktop file you originally made (try changing the icon again), it creates an additional more detailed "n.desktop" file.  It seems like any file that does end up in there, for whatever reason, should have the .desktop extension and that one file in there for each file out of there should be more than plenty, and that the icon I select should show up on the .desktop file I created (it doesn't), not just on some "p" or "n.desktop" file in a hidden settings directory.   If you open "Link to Application.desktop" in kate it still says Icon=exec.  You can modify that manually, and it will work.  Deleted the silly .local/share/applications directory and things work just fine, as long as you don't mind manually creating .desktop files.
Comment 1 kdebugs 2016-07-24 20:57:16 UTC
Created attachment 100276 [details]
screenshot of error message
Comment 2 Thiago Sueto 2020-10-27 02:56:37 UTC
I cannot reproduce this on current master.
In fact, creating a link to an application does not regenerate the deleted ~/.local/share/applications folder, not even when setting up an icon for that link.

Does the same happen for you?
Comment 3 Bug Janitor Service 2020-11-11 04:33:41 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2020-11-26 04:33:56 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!