Skip to content

Fix TERM env argument being misplaced in Flatpak

Anael González Paz requested to merge (removed):master into master

As it was previously, it only worked as intended if the user had only the binary as the start command (e.g. /bin/bash). Otherwise, it would had appended the flatpak-spawn related argument after the start command program.

Instead of passing the start command args to KSandbox::makeHostContext, this will append them to the ones returned by makeHostContext on the 'postProcessArgs' function. In case Konsole is being run as a Flatpak, all of said args would be added after --env=TERM=xterm-256color and the program name.

An alternative would be to modify KSandbox::makeHostContext behaviour, but that would require more work to be done. With this MR I intended to fix the issue whilst making the least possible number of changes to the codebase.

BUG: 497519

Merge request reports

Loading