startkde: Avoid pushing shell variables to UpdateLaunchEnvJob
Currently, startplasma
filters out shell variables when loading env
scripts and systemd environment variables. However, this is insufficient
if startplasma
itself was run from within a shell, which is the case
with X11 sessions in some distros. This causes SHELL=/bin/bash
to be set
in applications' launch environments, which may cause unexpected behavior.
One of the most visible examples is Konsole, where the default profile
will load bash (due to $SHELL
) instead of the user's actual shell.
This commit adds an additional check to filter out shell variables
before they are sent to UpdateLaunchEnvJob
.