https://bugs.kde.org/show_bug.cgi?id=413130

            Bug ID: 413130
           Summary: New startplasma-* apps corrupt/truncate exported shell
                    functions
           Product: plasmashell
           Version: 5.17.0
          Platform: openSUSE RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: k...@davidedmundson.co.uk
          Reporter: wba...@tmo.at
                CC: plasma-b...@kde.org
  Target Milestone: 1.0

This has been reported downstream here:
https://bugzilla.opensuse.org/show_bug.cgi?id=1154345
https://lists.opensuse.org/opensuse-factory/2019-10/msg00137.html

If the environment contains exported shell functions, the new startplasma
applications break them, resulting in error messages when opening a shell in
the Plasma session (as a side-effect, that also breaks kdesu).

To reproduce, make sure ~/.config/plasma-locale-settings.sh exists (some script
in ~/.config/plasma-workspace/env/ will probably do as well), and add something
like this to ~/.bashrc, ~/.profile or similar:
--------------------
function sayhello {
echo 'Hello!'
}

export -f sayhello
--------------------
Then logout/login to Plasma. If you open Konsole, you'll get this error now:
bash: sayhello: line 1: syntax error: unexpected end of file
bash: error importing function definition for `sayhello'

Running "env" (or plasma-sourceenv.sh) inside a Plasma session gives this
output:
...
BASH_FUNC_sayhello%%=() {  echo 'Hello!'
...

Correct would be:
...
BASH_FUNC_sayhello%%=() {  echo 'Hello!'
}
...
(this is what I get when running "env" in a non-Plasma session)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to