Bug 373658

Summary: KDEInit could not launch 'konsole'
Product: [Frameworks and Libraries] frameworks-kio Reporter: Alex Loes <alex>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED WORKSFORME    
Severity: normal CC: a.samirh78, arojas, cfeck, kde, kdelibs-bugs, notmart, p.stolz77, plasma-bugs, rikmills, sitter, tkedwards
Priority: NOR    
Version: 5.29.0   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alex Loes 2016-12-14 20:42:32 UTC
Hi
When I turn on then 'Run in terminal' option in a 'Link to application' on the desktop, I got the error message: KDEInit could not launch 'konsole'. However, when I run konsole in a shell, it works without a problem.

This issue appears after installing KDE Plasma 5.8.4 from the ppa:kubuntu-ppa/backports-landing.

Thanx
Comment 1 Marco Martin 2016-12-15 10:02:55 UTC
may be a packaging issue?
Comment 2 Kai Uwe Broulik 2016-12-20 09:23:32 UTC
I see a similar issue.

When I click a shortcut with "run in terminal" in plasmashell, it freezes:

#0  pthread_cond_wait@@GLIBC_2.3.2 ()                                                        
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f94e6b58a4b in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f94ebd81fa4 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#3  0x00007f94ebd3e3f3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#4  0x00007f94ebd2b28b in QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#5  0x00007f94e89fe235 in KToolInvocation::startServiceInternal(char const*, QString const&, QStringList const&, QString*, QString*, int*, QByteArray const&, bool, QString const&) ()
   from /usr/lib/x86_64-linux-gnu/libKF5Service.so.5
#6  0x00007f94e89fe94b in KToolInvocation::startServiceByDesktopPath(QString const&, QStringList const&, QString*, QString*, int*, QByteArray const&, bool) ()
   from /usr/lib/x86_64-linux-gnu/libKF5Service.so.5
#7  0x00007f94e4f249f1 in KRun::runService(KService const&, QList<QUrl> const&, QWidget*, bool, QString const&, QByteArray const&) ()
   from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#8  0x00007f94e4f0d38a in runApplication(QUrl const&, QString const&, QByteArray const&) ()
   from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#9  0x00007f94e4f0cd24 in KDesktopFileActions::runWithStartup(QUrl const&, bool, QByteArray const&) () from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#10 0x00007f94e4f20587 in KRun::runUrl(QUrl const&, QString const&, QWidget*, bool, bool, QString const&, QByteArray const&) () from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#11 0x00007f94e4f27bee in KRun::foundMimeType(QString const&) ()
   from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#12 0x00007f94e4f27740 in KRun::mimeTypeDetermined(QString const&) ()
   from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#13 0x00007f94e4f25b4d in KRun::init() ()
   from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#14 0x00007f94e4f26ed9 in KRun::slotTimeout() ()
   from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#15 0x00007f94e4f28884 in KRun::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    () from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#16 0x00007f94e6d5ab09 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

When I click the same file from Dolphin, kdeinit5 crashes and after that I get the "KDEInit could not launch konsole" error.
Comment 3 Marco Martin 2016-12-20 09:27:36 UTC
is there more than one konsole installed?
this freeze looks like the issue of wrong dbus service names we had in desktop files at the beginning of kf5 cycle
Comment 4 Rik Mills 2016-12-20 10:04:52 UTC
So far I can replicate this with Kubuntu 16.04 backports of 5.8.4 on both kubuntu and Mint, and in Neon dev edition.

Chakra with plasma 5.8.4 seem to behave as you would expect.
Comment 5 Alex Loes 2016-12-20 10:22:42 UTC
I have now found a solution for my problem: Just say in system settings->applicatins->default applications->Terminal Emulator->Use a different terminal program the path to the konsole program: /usr/bin/konsole.  All works again except that if you edit your icon, it doesn't contain no icon and no name, complains about that, but doesn't overwrite the old settings before you gave them a new name. 
Still work to be done, but good job already, girls and boys.

Al
Comment 6 Tim Edwards 2016-12-20 11:31:52 UTC
I also see this bug on Plasma 5.8.4 when using the Kubuntu backports PPA on Ubuntu 16.04. The workaround from Alex Loes works for me.

Apart from small annoyances like this I'm really impressed with the new Breeze icons and look and feel stuff in this release - fantastic work, keep it up!
Comment 7 Harald Sitter 2016-12-20 15:46:43 UTC
I think this would benefit from a step-by-step guide on how to reproduce the issue. I can't seem to reproduce this on a release nor git master build.

Also please make sure to post version information from this command 
`kf5-config --version; plasmashell --version; konsole --version`
Comment 8 Rik Mills 2016-12-20 16:39:56 UTC
(In reply to Harald Sitter from comment #7)
> I think this would benefit from a step-by-step guide on how to reproduce the
> issue. I can't seem to reproduce this on a release nor git master build.
> 
> Also please make sure to post version information from this command 
> `kf5-config --version; plasmashell --version; konsole --version`

I was able to reliably reproduce this in Neon dev edition this morning.

Now after doing several updates on that install today to pull in fixes for other issues, I am no longer able to reproduce this issue in Neon dev edition. Nor on a freshly installed Neon release VM.

I wonder if Kai Uwe Broulik can retest in Neon after applying today's updates to see if he gets the same result?
Comment 9 Alex Loes 2016-12-20 17:44:36 UTC
I got also an error message saying "Cannot launch /usr/bin/konsole" when I switch D-Bus from none instance to one or multiple instances.

When I try to place it in systray (also on advanced menu), the konsole ppops up indicating the error message: Warning: Could not find 'ksystraycmd', starting '/bin/bash' instead.  Please check your profile settings.

Al
Comment 10 Tim Edwards 2016-12-20 22:34:03 UTC
Steps to reproduce:
- System Settings->Applicatins->Default Applications->Terminal Emulator
- 'Use konsole as terminal application', click Apply
- create a script test.sh with this content:
#!/bin/bash
echo "Should see this in a Konsole window"
- in Dolphin create a 'Link to Application', with: Command:/path/to/test.sh, Advanced Options->Run in Terminal, Do not close when command exits

Try executing test.desktop by double-clicking it in Dolphin - it should show launch feedback but do nothing else

Now apply the workaround (System Settings->Applicatins->Default Applications->Terminal Emulator. Choose 'Use a different terminal program', specify the path to the konsole program: /usr/bin/konsole). Now double-click the desktop file and it'll actually show the konsole window with the command's output


$ kf5-config --version; plasmashell --version; konsole --version
Qt: 5.6.1
KDE Frameworks: 5.28.0
kf5-config: 1.0
plasmashell 5.8.4
Qt: 5.6.1
KDE Frameworks: 5.28.0
Konsole: 16.04.3

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial
Comment 11 Rik Mills 2016-12-20 22:45:06 UTC
Seems that this could on the Kubuntu/Mint side be a result of the following KDE commit to Kio:

https://cgit.kde.org/kio.git/commit/?id=c784a879eaba0babc6274bc32e761772add3d4f8

Apparently intended to fix similar issues with Konsole 16.08 and above, but in turn breaking this for 16.04.x

Will investigate solutions if this turns out to indeed be the case.
Comment 12 Christoph Feck 2016-12-21 03:46:10 UTC
Adding committer. I do not know of a way to test if the installed Konsole supports '-caption' or '-qwindowtitle', but maybe it could try the other, if the first fails?
Comment 13 Antonio Rojas 2016-12-21 20:15:08 UTC
Or rather remove it altogether? AFAIK konsole overrides the window title anyway, so this looks useless to me.
Comment 14 David Faure 2016-12-24 13:39:05 UTC
`konsole -qwindowtitle foo` actually works, and I suppose this feature is useful by showing in the konsole window title, which app it's running.

The best fix might be to add support for -caption to konsole, if we want to support KDE4 and KF5 konsoles and to keep the feature.
Comment 15 David Faure 2016-12-24 13:40:01 UTC
(alternatively we need to look up org.kde.konsole.desktop using KService::serviceByDesktopName for instance, and if that works it's the KF5 konsole)
Comment 16 Christoph Feck 2016-12-31 21:30:58 UTC
*** Bug 374138 has been marked as a duplicate of this bug. ***
Comment 17 Alex Loes 2017-02-26 16:59:33 UTC
I made a fresh installation from Mint 18.1 KDE 64 bit.
Now, neither konsole nor xterm opens a window. 
My versions now:
Qt: 5.6.1
KDE Frameworks: 5.28.0
kf5-config: 1.0
plasmashell 5.8.5
Qt: 5.6.1
KDE Frameworks: 5.28.0
Konsole: 16.04.3
Comment 18 Alex Loes 2017-02-26 17:25:03 UTC
After I completely rebooted, all went fine again. It isn't sufficient simply to logout and then login to KDE, you have to reboot the complete machine.

Al
Comment 19 Ahmad Samir 2020-05-28 20:15:21 UTC
I've just tested this, and it seems to work both with Konsole and /usr/bin/konsole.