Bug 461998

Summary: Alternative terminal setting not respected by eg Dolphin
Product: [Applications] systemsettings Reporter: Will Stephenson <wstephenson>
Component: kcm_componentchooserAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: nate, nicolas.fella
Priority: NOR    
Version First Reported In: 5.26.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=488864
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Will Stephenson 2022-11-18 14:43:39 UTC
SUMMARY
There is a mismatch between what the terminal chooser writes to kdeglobals and what KTerminalLauncherJob reads.
Because KTerminalLauncherJob reads a value for a configured alternate terminal which it cannot fetch a KService for, it always falls back to Konsole. Regression introduced in 246b23191d59ad852c8a56bc3af72fa8ff7308f8.


STEPS TO REPRODUCE
1. Select XTerm in kcm_componentchooser as terminal application
2. kdeglobals contains:
```
TerminalApplication=xterm
TerminalService=xterm.desktop
```
3. User uses 'Open Terminal Here' in dolphin's context menu, for example
4. https://invent.kde.org/frameworks/kio/-/blob/master/src/gui/kterminallauncherjob.cpp#L92 tries to fetch KService::serviceByStorageId("xterm.desktop"). This fails and the fallback konsole is picked instead.
5. If the TerminalService line is removed or changed to ="xterm", the correct terminal emulator is started by the LauncherJob.



OBSERVED RESULT
Konsole always starts irrespective of configuration

EXPECTED RESULT
Xterm starts when configured

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: openSUSE Tumbleweed (you know me)
(available in About System)
KDE Plasma Version: , 5.26.3
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2022-11-18 15:43:31 UTC
> Regression introduced in 246b23191d59ad852c8a56bc3af72fa8ff7308f8.

In which repository?