Bug 441072 - Dolphin cannot open konsole
Summary: Dolphin cannot open konsole
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: panels: terminal (show other bugs)
Version: 21.08.0
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-08-17 08:36 UTC by 1831420956
Modified: 2021-09-01 16:41 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.12
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 1831420956 2021-08-17 08:36:51 UTC
SUMMARY


STEPS TO REPRODUCE
1. Open Dolphin
2. Right-click -> open terminal
3. Nothing happened, Konsole has not be opened

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux KDE Plasma 5.22.4
(available in About System)
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-08-18 16:06:32 UTC
Works for me.

If you open Dolphin itself in Konsole first, and then try again, is anything suspicious printed to the Konsole window?
Comment 2 manliodp 2021-08-29 20:41:27 UTC
I'm not the OP but I noticed the same wrong behaviour, please find below requested dolphin console output:

kf.dbusaddons: Can not find 'kdeinit5' executable at  "/home/manliodp/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" "/usr/bin, /usr/bin"
WARNING: Please setup an KMessageHandler with KMessage::setMessageHandler to display message propertly.
(Could not launch Terminal Client)ERROR: Could not launch the terminal client:

KLauncher could not be reached via D-Bus. Error when calling kdeinit_exec_with_workdir:
The name org.kde.klauncher5 was not provided by any .service files

Thanks


Manlio
Comment 3 Antonio Rojas 2021-08-30 21:53:32 UTC
So, apparently KToolInvocation::invokeTerminal from kservice depends on kinit. This is quite bad packaging wise, as it creates a circular dependency kservice→kinit→kio→kded→kservice. This wasn't a problem until now because dolphin itself depended on kinit, but that's no longer the case in 21.08
Comment 4 Nate Graham 2021-08-31 15:03:31 UTC
I guess Dolphin needs to be ported to use KIO::kterminallauncherjob().
Comment 5 Bug Janitor Service 2021-08-31 15:12:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/263
Comment 6 Nate Graham 2021-08-31 15:13:34 UTC
I could not target the stable branch with that MR since it has to increase the frameworks dependency version. Nonetheless, if the MR is merged, packagers can backport it safely as long as they're already shipping Frameworks 5.83 or newer.
Comment 7 Nate Graham 2021-09-01 16:41:11 UTC
Git commit 27bfcde4efaf936243fc41e4a61d0cac32105ef6 by Nate Graham.
Committed on 31/08/2021 at 15:12.
Pushed by ngraham into branch 'master'.

Port to KTerminalLauncherJob

Dolphin still uses KToolInvocation::invokeTerminal() which is
deprecated and requires KInit. However Dolphin was ported away from
requiring it in other ways, so it is now possible to have Dolphin
running but not KInit, which breaks the "Open in Terminal"
functionality.

Using KTerminalLauncherJob fixes this. It was introduced in Frameworks
5.83, so the CMake dependency version is accordingly increased.
FIXED-IN: 21.12

M  +1    -1    CMakeLists.txt
M  +10   -4    src/dolphinmainwindow.cpp
M  +4    -2    src/dolphinpart.cpp

https://invent.kde.org/system/dolphin/commit/27bfcde4efaf936243fc41e4a61d0cac32105ef6
Comment 8 Nate Graham 2021-09-01 16:41:34 UTC
This commit should be cherry-pickable