Bug 455924 - Plasmashell (KRunner/Kickoff) refuse to launch '.exe' files.
Summary: Plasmashell (KRunner/Kickoff) refuse to launch '.exe' files.
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.25.1
Platform: OpenSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Nate Graham
URL:
Keywords:
: 456425 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-25 16:39 UTC by Lemuel Simon
Modified: 2022-08-20 01:30 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lemuel Simon 2022-06-25 16:39:02 UTC
SUMMARY
Although the Windows executable is marked 'executable' and the drive is mounted with the execution bit, Plasma (Kickoff and KRunner) will refuse to launch the program, citing 'For security reasons, launching executable is not allowed in this context.'. However, if I were to navigate to the executable's location with Dolphin and launch it, it works normally.


STEPS TO REPRODUCE
1. Open KRunner or Kickoff.
2. Type-in name of program. 'Eg. Ultrakill.exe'
3. Click to run the executable.

OBSERVED RESULT
Instead of the program launching, a notification shows up stating 'For security reasons, launching executables is not allowed in this context.'. 

EXPECTED RESULT
The program should be able to execute from Plasmashell. 

Operating System: openSUSE Leap 15.4
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.2
Kernel Version: 5.14.21-150400.22-default (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-3320M CPU @ 2.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000

ADDITIONAL INFORMATION
I understand that these measures are there for 'security', but the criteria for what is allowed or blocked is vague and potentially frustrating to the end-user.  This issue affected Dolphin earlier: https://bugs.kde.org/show_bug.cgi?id=429603 . Can the logic be dumbed-down to match GNOME's?
Comment 1 Nate Graham 2022-06-27 19:00:02 UTC
This generally means we made a mistake and forgot to set the setAllowExecutables(true) on the launcher job.

I assume you're expecting it to launch with WINE?
Comment 2 Bug Janitor Service 2022-06-27 19:14:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1009
Comment 3 Bug Janitor Service 2022-06-27 19:20:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1874
Comment 4 Lemuel Simon 2022-07-01 01:13:53 UTC
(In reply to Nate Graham from comment #1)
> I assume you're expecting it to launch with WINE?
Yes, exactly that. 

I see in the linked merge requests that there were some security implications there (as previously suspected). Is it possible to do what Dolphin does and prompt the user before it's executed?
Comment 5 Nate Graham 2022-07-01 13:42:59 UTC
Yeah, that's what we're trying to figure out how to do.
Comment 6 Nate Graham 2022-07-13 18:11:59 UTC
*** Bug 456425 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2022-08-20 01:30:30 UTC
Git commit 1a8b6ba787b8943317843be62df8a8a3505bd7d6 by Nate Graham.
Committed on 20/08/2022 at 01:21.
Pushed by ngraham into branch 'master'.

Show "open or execute?" dialog when opening executable files

Those files may be executable and the user wants them to execute. For
example:
- Shell scripts the user has written to perform commonly-used actions
- Windows executables opened with WINE

For this reason, we should stop explicitly blocking running executable
files when accessed with KRunner runners or Kicker/Kickoff/Application
Dashboard, and instead show the typical "open or execute?" dialog that
respects the user's setting for what to do in this case.
FIXED-IN: 5.26

M  +5    -0    applets/kicker/plugin/fileentry.cpp
M  +4    -1    applets/kicker/plugin/recentusagemodel.cpp
M  +3    -2    runners/baloo/baloosearchrunner.cpp
M  +4    -2    runners/recentdocuments/recentdocuments.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/1a8b6ba787b8943317843be62df8a8a3505bd7d6