STEPS TO REPRODUCE 1. Install Konsole from Flathub, and don't install it from your distro (or uninstall it). 2. Create a tiny .desktop file that runs a terminal command, like this: [Desktop Entry] Exec=speak-ng hello Name=Say something Icon=kmouth Type=Application Terminal=true 3. Launch it. OBSERVED RESULT An error message saying "Terminal konsole not found while trying to run [path to file]" EXPECTED RESULT Konsole opens, the speakers play "hello", and then Konsole closes ADDITIONAL INFORMATION System Settings > Default Applications shows "Konsole" as the default terminal app. The fact that the error message says "konsole" and not "Konsole" leads me to believe that it's trying to run the `konsole` executable, which won't work for a Flatpak app.
relevant code is at https://invent.kde.org/frameworks/kio/-/blob/master/src/core/desktopexecparser.cpp#L491 It doesn't handle this correctly, it should be looking up terminal apps by desktop entry name, not command. KTerminalLauncherJob handles this much better: https://invent.kde.org/frameworks/kio/-/blob/master/src/gui/kterminallauncherjob.cpp#L85
Would it make sense to port it to use KTerminalLauncherJob directly?
Maybe. Or extract the relevant part of it into a shared function