Bug 470454

Summary: Java executable mis-detected as manpage and therefore does not execute or offer to execute when opened
Product: [Frameworks and Libraries] frameworks-kio Reporter: iodreamify
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: ASSIGNED ---    
Severity: normal CC: kdelibs-bugs, meven29, nate, nicolas.fella
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
URL: https://archive.org/download/setris-1.2/Setris-1.2_LINUX.tar.gz
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description iodreamify 2023-05-30 14:50:08 UTC
SUMMARY
I've recently downloaded a java game with the executable bit already set. If you click the executable it provides Dolphin sees it as a "Manual page" and tries to open it with Kate, which of course produces only garbage. The system doesn't even ask if i want to open the file as an executable, like with Appimages for example. It doesn't matter if the executable bit is set or not. 

The file command in the terminal sees it as a 
"ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b566cf063c546e8cd7ce4fe9c1ce81ddbb9c00f1, for GNU/Linux 3.2.0, not stripped" 

and the mime type is  "application/x-executable; charset=binary"

I am not sure if i can attach the file as an example here but the example game is from here: 
https://mslivo.itch.io/setris

The game launches just fine through the terminal.

STEPS TO REPRODUCE
1. Extract the archive
2. Double click the Setris-1.2 executable

OBSERVED RESULT
File is opened through kate

EXPECTED RESULT
Plasma treats it as an executable and asks me what to do

Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.2.15-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 1 iodreamify 2023-05-30 14:53:52 UTC
Minor addition: Plasma sees it as application/x-troff-man
Comment 2 Nate Graham 2023-06-05 04:11:24 UTC
Can confirm. `file --mime-type` knows it for what it is, but KIO seems confused. CCing some people who might know what's going on here.
Comment 3 iodreamify 2024-09-21 01:37:15 UTC
Still happening with kio 6.6.0 and Dolphin 24.08.1
Comment 4 Bug Janitor Service 2024-09-21 08:02:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1725