diff --git a/kdecore/kernel/ktoolinvocation_x11.cpp b/kdecore/kernel/ktoolinvocation_x11.cpp
index 5168f2f..ed2a9ab 100644
--- a/kdecore/kernel/ktoolinvocation_x11.cpp
+++ b/kdecore/kernel/ktoolinvocation_x11.cpp
@@ -405,18 +405,20 @@ void KToolInvocation::invokeTerminal(const QString &command,
QStringList cmdTokens = KShell::splitArgs(exec);
QString cmd = cmdTokens.takeFirst();
- if (exec == QLatin1String("konsole") && !workdir.isEmpty()) {
- cmdTokens << QString::fromLatin1("--workdir");
- cmdTokens << workdir;
- // For other terminals like xterm, we'll simply change the working
- // directory before launching them, see below.
+ if (exec == QLatin1String("konsole")) {
+ cmdTokens += QString::fromLatin1("--nofork");
+
+ if (!workdir.isEmpty()) {
+ cmdTokens << QString::fromLatin1("--workdir");
+ cmdTokens << workdir;
+ // For other terminals like xterm, we'll simply change the working
+ // directory before launching them, see below.
+ }
}
- QString error;
- if (self()->startServiceInternal("kdeinit_exec_with_workdir",
- cmd, cmdTokens, &error, 0, NULL, startup_id, false, workdir)) {
+ if (!QProcess::startDetached(cmd, cmdTokens)) {
KMessage::message(KMessage::Error,
- i18n("Could not launch the terminal client:\n\n%1", error),
+ i18n("Could not launch the terminal client"),
i18n("Could not launch Terminal Client"));
}
}