Bug 459646

Summary: Some .desktop files are always executed on clicking
Product: [Applications] dolphin Reporter: Kishore Gopalakrishnan <kishore96>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kfm-devel
Priority: NOR    
Version: 22.08.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kishore Gopalakrishnan 2022-09-25 13:16:21 UTC
SUMMARY
When left-clicking (either single- or double-click depending on the config) an executable file, one can configure Dolphin to ask what to do or to open the file in another application instead of just executing it. However, this setting is not obeyed for some .desktop files.

STEPS TO REPRODUCE
1. Go to Settings > configure Dolphin > General > confirmation, and set 'when opening executable files' to 'always ask'
2. In Dolphin, right-click > create new > link to location (URL), and enter any URL to create a corresponding .desktop file in the current folder
3. Open the .desktop file (either single or double click depending on your system settings)

OBSERVED RESULTS
The URL is opened in the default browser.

EXPECTED RESULTS
Dolphin should ask whether to 'execute' the .desktop file or whether to open the .desktop file itself in the default application for text files, since a user who has chosen this configuration for executables will probably be unhappy with .desktop files being directly 'executed'.

SOFTWARE VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.15.70-1-lts (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Here is an example of a .desktop file for which this happens (strangely, permissions are 644, not executable):
```
[Desktop Entry]
Icon=text-html
Name=Datasets
Type=Link
URL[$e]=https://turbulence.pha.jhu.edu/datasets.aspx
```

Strangely, the config is obeyed for .desktop files which are present in .local/share/applications