Kate launched from an icon as `kate -b %U`, brings up the session chooser window. If I click on Quit I get an error message 'KDEInit could not launch /usr/bin/kate'.
I also think this error message is not necessary and the error prompt flow should be handled more properly. This issue still exists for Kate 18.08.3 so I changed the version from 17.04.2 to 18.08.3.
Error message comes from plasmashell, reassigning.
Plasmashell just runs whatever is in the exec line via KRun. It's not us. Check your return values.
Right, I should have checked properly, sorry about that. I think it's a problem with klauncher; when opening kate from a widget on the panel/desktop, the user could get the session chooser dialog, which is shown before the main kate app event loop is started at all, and so KLauncher::matchesPendingRequest() will always return false as the appId hasn't been changed from the unique :x.xxx to org.kde.kate; when the user quits/closes the dialog without starting kate, klauncher thinks the process has died and displays the error message in question. I think one way to fix the issue is to set the request as done when the exitStatus is 0: https://phabricator.kde.org/D18089
Git commit c29988a97b3ae7abc0d196a1166eb16ee6c3fa95 by David Faure, on behalf of Ahmad Samir. Committed on 02/02/2019 at 10:54. Pushed by dfaure into branch 'master'. KLauncher: handle processes exiting without error When a process exits without error (exitStatus=0), it could well be the app exited cleanly, and there's no need to display an error message. For example starting kate from a widget on the panel/desktop, where it shows the session chooser dialog before ever entering the main app event loop, then quitting/closing the dialog without starting kate. In a case like that matchesPendingRequest() will always return false as the service name hasn't (and won't) been changed from the unique :x.xxx to org.kde.kate. FIXED-IN: 5.55.0 M +8 -1 src/klauncher/klauncher.cpp https://commits.kde.org/kinit/c29988a97b3ae7abc0d196a1166eb16ee6c3fa95