When a shortcut is assigned to a terminal application (e.g. fish, htop) in the menu editor, pressing that shortcut will launch the application without a terminal, despite the menu item specifies "Run in terminal".
STEPS TO REPRODUCE
1. Open menu editor
2. Select htop
3. Assign shortcut "Meta-H"
4. Press Meta-H
kglobalaccel5: Error opening terminal: unknown
htop opens in a terminal
(available in About System)
KDE Plasma Version: 5.24.90
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
BTW, the "Error opening terminal: unknown" message is printed by htop, when run without a terminal.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kglobalaccel/-/merge_requests/47
Wrong tab, sorry.
Git commit b72930eb075a79ff89e8db221749de978706e5bf by Ahmad Samir, on behalf of Jin Liu.
Committed on 02/07/2022 at 12:26.
Pushed by ahmadsamir into branch 'master'.
Launch app in terminal when Terminal=true
When the desktop file has Terminal=true (e.g. htop), it should be
launched in a terminal.
Instead of calling "kstart5 -- <exec path>", this calls
"kstart5 --application <desktop file name>" when and only when:
1. kstart5 is available
2. the desktop file is in XDG_DATA_HOME/applications/,
3. we are launching the desktop file's main group, not other actions
M +35 -16 src/runtime/kserviceactioncomponent.cpp
M +3 -0 src/runtime/kserviceactioncomponent.h