Bug 504716

Summary: Run in Konsole breaks with ampersand
Product: [Applications] konsole Reporter: Jared Adams <jaxad0127>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 25.04.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jared Adams 2025-05-23 23:21:09 UTC
Using the Run in Konsole service menu from Dolphin with a script that ends in an ampersand causes the final command to not run.

Sample script:
#!/usr/bin/env bash
echo A
echo B &

Running the script normally, both A and B are printed.  Using Run in Konsole, only A is printed.

More information in Reddit post: https://www.reddit.com/r/kde/comments/1ktcvfu/how_to_run_a_flatpak_program_from_within_a_script/

Operating System: CachyOS Linux 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.7-3-cachyos (64-bit)
Graphics Platform: Wayland
Comment 1 Jared Adams 2025-05-24 11:44:21 UTC
Running the command from menu manually (konsole --hold -e /path/to/script), I don't see the issue. This script also never has the issue:
#!/usr/bin/env bash
echo A &
echo B &

This bug is wild.
Comment 2 Jared Adams 2025-05-24 13:05:11 UTC
It happens randomly. both Run in Konsole and the command work sometimes, break sometimes. Very inconsistent.