SUMMARY When "Open by double-clicking" option is enabled, double-clicking on a script file executes it, which is unsafe (the same for single-clicking, when that option is disabled). It is necessary to add an option (like in the Dolphin) that allows the user to choose what to do with the file being opened: execute, open in a text editor or always ask. STEPS TO REPRODUCE 1. Create a script file on the desktop, for example: > #!/bin/bash > touch test.txt 2. Open it by double-clicking (or single-clicking, depending on whether the "Open by double-clicking" option is enabled or not) OBSERVED RESULT Script file is executed EXPECTED RESULT The user is asked for what to do with the script file SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE Tumbleweed 20210406 / X11 KDE Plasma Version: 5.21.3 KDE Frameworks Version: 5.15.2 Qt Version: 5.80.0
Can confirm. The value of behaviourOnLaunch= in ~/.config kiorc is ignored, unlike in Dolphin. It works in Dolphin when viewing ~/Desktop as well as desktop:// so it's not a problem of the desktop ioslave. Seems to be an issue in Folder View itself. I'm guessing this is intentional, because users tend to put app shortcuts on their desktop and we don't want to badger them when they launch them. However this behavior acts on executables irrespective of whether they're .desktop files, shortcuts to .desktop files, appImages, shell scripts, Python files, etc.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/632
Git commit 085f9b7e520a5b5f921a5b9a353d20be73c3d4ad by Nate Graham, on behalf of Eugene Popov. Committed on 25/10/2021 at 14:52. Pushed by ngraham into branch 'Plasma/5.23'. [Folder View] Fix executing file without prompting When executing file without prompting, make sure it's a desktop file. M +2 -1 containments/desktop/plugins/folder/foldermodel.cpp https://invent.kde.org/plasma/plasma-desktop/commit/085f9b7e520a5b5f921a5b9a353d20be73c3d4ad
Git commit 8a97cd487d01662f41d9ed2aecc4d867e4edf559 by Nate Graham, on behalf of Eugene Popov. Committed on 25/10/2021 at 14:55. Pushed by ngraham into branch 'master'. [Folder View] Fix executing file without prompting When executing file without prompting, make sure it's a desktop file. (cherry picked from commit 085f9b7e520a5b5f921a5b9a353d20be73c3d4ad) M +2 -1 containments/desktop/plugins/folder/foldermodel.cpp https://invent.kde.org/plasma/plasma-desktop/commit/8a97cd487d01662f41d9ed2aecc4d867e4edf559