Bug 421454 - Service file specifying 'run in terminal' does not work, "Unknown error code 100"
Summary: Service file specifying 'run in terminal' does not work, "Unknown error code ...
Status: RESOLVED DUPLICATE of bug 421374
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-13 10:30 UTC by Jonathan Marten
Modified: 2020-05-13 10:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***