Git commit 8b0b6869ec501ec1bd244b73d065d3504ee3906f by Toni Asensi Esteve, on 
behalf of Magomed Gadzhiumarov.
Committed on 06/09/2026 at 23:46.
Pushed by asensi into branch 'master'.

Replace custom terminal execution logic and Konfigurator settings with
KTerminalLauncherJob to respect system-wide default terminal settings.

This simplifies the codebase and removes legacy terminal options from
Konfigurator and defaults.

GUI: The terminal emulator is not chosen in Konfigurator.

FIXED: [ 402046 ] Tools / Start terminal here broken?
BUG: https://bugs.kde.org/show_bug.cgi?id=402046

FIXED: [ 524380 ] [Feature Request] Use KTerminalLauncherJob to respect system 
default terminal
BUG: https://bugs.kde.org/show_bug.cgi?id=524380

Revision: https://invent.kde.org/utilities/krusader/-/merge_requests/195

M  +0    -7    app/Konfigurator/kggeneral.cpp
M  +1    -2    app/Panel/listpanelactions.cpp
M  +0    -2    app/defaults.h
M  +5    -20   app/krslots.cpp

https://invent.kde.org/utilities/krusader/-/commit/8b0b6869ec501ec1bd244b73d065d3504ee3906f

diff --git a/app/Konfigurator/kggeneral.cpp b/app/Konfigurator/kggeneral.cpp
index 1979571cc..436884a84 100644
--- a/app/Konfigurator/kggeneral.cpp
+++ b/app/Konfigurator/kggeneral.cpp
@@ -270,13 +270,6 @@ void KgGeneral::createGeneralTab()
     QGroupBox *terminalGrp = createFrame(i18n("Terminal"), tab);
     QGridLayout *terminalGrid = createGridLayout(terminalGrp);
 
-    QLabel *label3 = new QLabel(i18n("External Terminal:"), generalGrp);
-    terminalGrid->addWidget(label3, 0, 0);
-    KonfiguratorURLRequester *urlReq2 = createURLRequester("General", 
"Terminal", _Terminal, label3, generalGrp, false, QString(), PAGE_GENERAL, 
false);
-    terminalGrid->addWidget(urlReq2, 0, 1);
-    QLabel *terminalLabel = new QLabel(i18n("%d will be replaced by the 
workdir."), terminalGrp);
-    terminalGrid->addWidget(terminalLabel, 1, 1);
-
     KONFIGURATOR_CHECKBOX_PARAM terminal_settings[] = {
         //   cfg_class  cfg_name     default        text            restart 
tooltip
         {"General",
diff --git a/app/Panel/listpanelactions.cpp b/app/Panel/listpanelactions.cpp
index fdfbde1b3..0572dee00 100644
--- a/app/Panel/listpanelactions.cpp
+++ b/app/Panel/listpanelactions.cpp
@@ -132,8 +132,7 @@ ListPanelActions::ListPanelActions(QObject *parent, 
KrMainWindow *mainWindow)
     actDeleteF8->setToolTip(i18n("Delete file, folder, etc."));
     actTerminalF9->setToolTip(
         i18n("<qt><p>Open terminal in current folder.</p>"
-             "<p>The terminal can be defined in Konfigurator, "
-             "default is <b>konsole</b>.</p></qt>"));
+             "<p>It uses the system default terminal emulator.</p></qt>"));
 }
 
 void ListPanelActions::activePanelChanged()
diff --git a/app/defaults.h b/app/defaults.h
index 592080124..086fbfabd 100644
--- a/app/defaults.h
+++ b/app/defaults.h
@@ -111,8 +111,6 @@
 /////////////////////// [General]
 // Move To Trash //////
 #define _MoveToTrash true
-// Terminal ///////////
-#define _Terminal "konsole --separate"
 // Send CDs ///////////
 #define _SendCDs true
 // Follow Terminal CD ///////////
diff --git a/app/krslots.cpp b/app/krslots.cpp
index 6e1270c74..1f48b3a2b 100644
--- a/app/krslots.cpp
+++ b/app/krslots.cpp
@@ -24,8 +24,7 @@
 #include <KIO/FileCopyJob>
 #include <KLocalizedString>
 #include <KMessageBox>
-#include <KSharedConfig>
-#include <KShell>
+#include <KTerminalLauncherJob>
 #include <KToggleAction>
 #include <utility>
 
@@ -54,8 +53,8 @@
 #include "GUI/krusaderstatus.h"
 #include "GUI/mediabutton.h"
 #include "GUI/terminaldock.h"
-#include "KrViewer/krviewer.h"
 #include "Konfigurator/konfigurator.h"
+#include "KrViewer/krviewer.h"
 #include "Locate/locate.h"
 #include "MountMan/kmountman.h"
 #include "Panel/PanelView/krselectionmode.h"
@@ -398,23 +397,9 @@ void KrSlots::locate()
 
 void KrSlots::runTerminal(const QString &dir)
 {
-    KProcess proc;
-    proc.setWorkingDirectory(dir);
-    KConfigGroup group(krConfig, "General");
-    QString term = group.readEntry("Terminal", _Terminal);
-    QStringList sepdArgs = KShell::splitArgs(term, KShell::TildeExpand);
-    if (sepdArgs.isEmpty()) {
-        KMessageBox::error(krMainWindow, i18nc("Arg is a string containing the 
bad quoting.", "Bad quoting in terminal command:\n%1", term));
-        return;
-    }
-    for (int i = 0; i < sepdArgs.size(); i++) {
-        if (sepdArgs[i] == "%d") {
-            sepdArgs[i] = dir;
-        }
-    }
-    proc << sepdArgs;
-    if (!proc.startDetached())
-        KMessageBox::error(krApp, i18n("Error executing %1.", term));
+    auto *job = new KTerminalLauncherJob({}); // pass an empty command
+    job->setWorkingDirectory(dir);
+    job->start();
 }
 
 void KrSlots::homeTerminal()

Reply via email to