Bug 497409 - Edits to a .desktop file in a subfolder of ~/.local/share/applications are instead written to a new file in the main .../applications folder
Summary: Edits to a .desktop file in a subfolder of ~/.local/share/applications are in...
Status: RESOLVED WORKSFORME
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: 6.2.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-13 11:56 UTC by Peter Shkenev
Modified: 2025-01-21 03:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Shkenev 2024-12-13 11:56:22 UTC
SUMMARY
If one edits a .desktop file, it could be saved in a wrong location due to slashes in file path replaced with dashes, so that Kickoff still looks at the original version, effectively ignoring all changes made.

STEPS TO REPRODUCE
1. Open .desktop file editing dialogue (In my case, it is Rome: Total war, installed with wine, path to the desktop file ~/.local/share/applications/wine/Programs/Total War/Rome - Total War/Rome - Total War.desktop )
2. Make some changes (I have added gamescope invocation)
3. Save the file

OBSERVED RESULT
Kickoff ignores all changes, and if one opens the .desktop file editing dialogue again, it will show the original version.
Also, there is a new .desktop file (In my case, ~/.local/share/applications/wine-Programs-Total War-Rome - Total War-Rome - Total War.desktop) which contains all the changes.

EXPECTED RESULT
The dialogue writes changes to the old file, so Kickoff picks the changes and I can play my game with gamescope

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241211
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.11.8-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × 13th Gen Intel® Core™ i7-1360P
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Graphics

ADDITIONAL INFORMATION
Just in case, I will repeat file paths involved:
Original, supposed to be edited: ~/.local/share/applications/wine/Programs/Total War/Rome - Total War/Rome - Total War.desktop
Where it was written: ~/.local/share/applications/wine-Programs-Total War-Rome - Total War-Rome - Total War.desktop
Comment 1 John Kizer 2024-12-22 04:34:15 UTC
Hi - interestingly, I can reproduce the filename saving issue, but I can't reproduce Kickoff still choosing the old file - for me, it displays the newly-edited file from the main ~/.local/share/applications directory.

Are both Kickoff and KDE Menu Editor displaying the original subfolder .desktop file as the one for that application on your system?

The overall behavior might be related in some way to https://bugs.kde.org/show_bug.cgi?id=475995 ?
Comment 2 John Kizer 2024-12-22 04:40:12 UTC
(In reply to John Kizer from comment #1)
> Are both Kickoff and KDE Menu Editor displaying the original subfolder
> .desktop file as the one for that application on your system?

Sorry for the multiple messages, but I realized I should clarify - if, after you save changes and the new file is written, you go to the application in the Application Launcher/Kickoff menu and right-click > Edit Application, does it show the original subfolder location in the Properties dialog?
Comment 3 Bug Janitor Service 2025-01-06 03:47:33 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2025-01-21 03:47:46 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.