Bug 421454

Summary: Service file specifying 'run in terminal' does not work, "Unknown error code 100"
Product: [Frameworks and Libraries] frameworks-kio Reporter: Jonathan Marten <jjm>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kdelibs-bugs
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jonathan Marten 2020-05-13 10:30:30 UTC
SUMMARY

The desktop file:

[Desktop Entry]
Exec=ls 
Name=Terminal test
Terminal=true
TerminalOptions=--hold
Type=Application

should launch the default terminal application and execute the command.  However, as reported on bug #421364, if the desktop file is launched with 'kioclient5 exec test.desktop' or by any other means an error box is shown:

  Unknown error code 100
  Could not find the program 'konsole'
  Please send a full bug report at https://bugs.kde.org.

with the debug message:

  kioclient(1227906) findNonExecutableProgram: Internal program error.
  QStandardPaths::findExecutable couldn't find "konsole" but our own logic found it
  at "/usr/bin/konsole" . Please report a bug at https://bugs.kde.org

The problem seems to be in KIO::DesktopExecParser::resultingArguments() where, if service.terminal() is true, the user's configured terminal application or konsole as a default is prepended to the command line (with appropriate options).  However, this is most likely to be a relative path.  This then triggers the "nonExecutable" check in KProcessRunner::KProcessRunner().

STEPS TO REPRODUCE
1.  Execute the desktop file as above using kioclient5.

OBSERVED RESULT

Error and debug messages as above are shown, and no terminal is launched

EXPECTED RESULT

A terminal is launched and the current directory is listed

SOFTWARE/OS VERSIONS
KDE Frameworks Version: 5.71.0
Qt Version: 5.14.2
Comment 1 Jonathan Marten 2020-05-13 10:38:41 UTC

*** This bug has been marked as a duplicate of bug 421374 ***