[konsole] [Bug 500040] New: Flatpak Konsole inserting --env breaks some commands
Tom
bugzilla_noreply at kde.org
Fri Feb 14 04:10:18 GMT 2025
https://bugs.kde.org/show_bug.cgi?id=500040
Bug ID: 500040
Summary: Flatpak Konsole inserting --env breaks some commands
Classification: Applications
Product: konsole
Version: 24.12.2
Platform: Flatpak
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: konsole-devel at kde.org
Reporter: kdebugs at halffull.org
Target Milestone: ---
SUMMARY
In the case of Konsole running through Flatpak, it adds
`--env=TERM=xterm-256color` to the arguments of run commands. The issue is
that it can be inserted in the middle of commands, so it's not being passed to
Flatpak as intended, but to the user command which will not understand that
argument.
My distro recently dropped Konsole from its base image, requiring users to
install it through Flatpak instead, so I'm having this issue in a number of
places. For example, the system update program's .desktop file runs `ujust
update` in a terminal, and my default terminal is Konsole, but this no longer
works because ujust doesn't understand the added argument.
STEPS TO REPRODUCE
1. `konsole --hold -e /usr/bin/bash -c 'echo hi'`
OBSERVED RESULT
```
/usr/bin/bash: --: invalid option
Usage...
```
The `--env` argument is being inserted *after* bash, and of course bash doesn't
understand it. I believe this is because the code is assuming commands are
just one word, popping once, adding `--env`, and pushing the one word back on.
EXPECTED RESULT
I would expect this to start bash to run an echo command. Konsole
documentation says everything after `-e` is taken as a command to run.
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Bazzite 41; kernel 6.12.12
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
ADDITIONAL INFORMATION
The relevant code:
https://invent.kde.org/utilities/konsole/-/blob/5386a0e59d968dd057f318aaf5c70eb15b8e9784/src/session/Session.cpp#L462
>From this commit:
https://invent.kde.org/utilities/konsole/-/commit/646c935892fa6c0b4cfae3ae8c990ee6e9956f0e
>From this MR: https://invent.kde.org/utilities/konsole/-/merge_requests/830
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list