Bug 494124

Summary: Unsetting the executable bit might reorder a .desktop file
Product: [Applications] dolphin Reporter: Mors Mortium <morsmortium>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kfm-devel, p.r.worrall
Priority: NOR    
Version: 24.08.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The bug happening

Description Mors Mortium 2024-10-04 15:54:18 UTC
Created attachment 174425 [details]
The bug happening

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY

STEPS TO REPRODUCE
1. Copy a .desktop file, that has the executable bit set from /usr/share/applications
2. Observe the order of lines, or just keep it open
3. Right click the file in Dolphin
4. Click Properties
5. Click Permissions
6. Uncheck "is executable"
7. Click Ok

OBSERVED RESULT
The file gets reordered

EXPECTED RESULT
The file stays the same, just not an executable

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3

ADDITIONAL INFORMATION
Tested it with org.kde.kmail2.desktop and kdesystemsettings.desktop, both got reordered, but as org.kde.kmail2.desktop had different sections from [Desktop Entry], that became the first, which in turn broke it opening with `gio launch`
Comment 1 Paul Worrall 2024-10-05 06:50:16 UTC
Confirmed. That is truly surprising behaviour!

Operating System: Arch Linux 
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.8.0
Graphics Platform: Wayland