https://bugs.kde.org/show_bug.cgi?id=497519
Bug ID: 497519 Summary: Konsole Flatpak inserts an unexpected penultimate argument when the start command includes more than just the program Classification: Applications Product: konsole Version: 24.12.0 Platform: Flatpak OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: konsole-de...@kde.org Reporter: an...@anael.es Target Milestone: --- SUMMARY Since https://invent.kde.org/utilities/konsole/-/merge_requests/830, the argument “--env=TERM=xterm-256color” is appended as the last but one argument in Konsole's start command. This is not noticeable by default, because the start command is just the shell (e.g. /bin/bash); being annexed to flatpak-spawn instead, as intended. However, if the user passes one or more args, the TERM env variable will be passed to the start command (be it the shell or something else) instead of flatpak-spawn. STEPS TO REPRODUCE 1. Open a terminal or KRunner 2. Run `flatpak run org.kde.konsole --hold -e /bin/echo Example` OBSERVED RESULT Konsole shows “--env=TERM=xterm-256color Example“, because --env=TERM=xterm-256color was passed as an argument. EXPECTED RESULT Konsole should show just “Example”. “--env=TERM=xterm-256color” should be passed to flatpak-spawn and not the user-provided command. SOFTWARE/OS VERSIONS Konsole Version: 24.12.0 Operating System: Fedora Linux 41 Flatpak runtime: org.kde.Platform/x86_64/6.8 KDE Frameworks Version: 6.8.0 (6.9.0 inside the runtime) Qt Version: 6.8.0 ADDITIONAL INFORMATION This behaviour prevents me from using Konsole as a Flatpak with my current profile. When I launch the Konsole Flatpak with a custom command: ``` [General] Command=/bin/bash --init-file $HOME/.local/share/bash/bashrc ``` Konsole closes immediately upon launch. If launched with the --hold option, bash gives the following error: line 11: return: can only `return' from a function or sourced script. I discovered afterwards that the real command that was being executed was: /bin/bash --init-file --env=TERM=xterm-256color $HOME/.local/share/bash/bashrc If any arguments besides the shell/program binary are provided, Konsole will always append “--env=TERM=xterm-256color” before the last argument. -- You are receiving this mail because: You are watching all bug changes.