Startplasma-x11[2616]: org.kde.plasma.libkworkspace : ERROR --- NEW

this thread replace the one from myself on 2023/07/27 17h45 which can be removed by administrators if required.

I use /etc/profile.local to set bash global function and bash global env var.

My file “system_common_function” is sourced in /etc/profile.local to set global function.
My file “system_common_general_env_var” is sourced in /etc/profile.local to set global variables.

PROBLEM 1 :

To print in purple i use a variable named ‘MY_LIGHT_PURPLE’ which is defined in the file “system_common_general_env_var”
This is working as expected
Code :

echo "$MY_LIGHT_PURPLE  This is a test"

Print text in light purple as expected
MY_LIGHT_PURPLE is defined like this :

MY_LIGHT_PURPLE=$'\033[1;34m'

But journalctl show :

juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable "MY_LIGHT_PURPLE" as value contains unsupported characters

PROBLEM 2 :

All global functions defined in “system_common_function” are not accessible by users.
Using any function return an error.
Example using my function ‘get_uuid_of_swap’ which should return the uuid of t(he swap partition :

get_uuid_of_swap
If 'get_uuid_of_swap' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf get_uuid_of_swap

journal ctl show :

juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable “BASH_FUNC_get_uuid_of_swap%%” as name contains unsupported characters

In the file “system_common_function” the function is defined as this :

function get_uuid_of_swap () {

local L_FLAG

L_FLAG=$(lsblk -o uuid,mountpoint | grep -w 'SWAP' | cut -d' ' -f1)
if [[ -n "$L_FLAG" ]] ; then
	echo "$L_FLAG"
	return 0
fi
return "$E_NOT_CONFIGURED"

}

export -f get_uuid_of_swap

I use my two files for a very long times and it was working as expected up to 15.4

Locale is set like that :

    user_install@15-5-G731GV:~> locale
    LANG=en_US.UTF-8
    LC_CTYPE=“en_US.UTF-8”
    LC_NUMERIC=fr_FR.UTF-8
    LC_TIME=fr_FR.UTF-8
    LC_COLLATE=“en_US.UTF-8”
    LC_MONETARY=fr_FR.UTF-8
    LC_MESSAGES=“en_US.UTF-8”
    LC_PAPER=“en_US.UTF-8”
    LC_NAME=“en_US.UTF-8”
    LC_ADDRESS=“en_US.UTF-8”
    LC_TELEPHONE=“en_US.UTF-8”
    LC_MEASUREMENT=fr_FR.UTF-8
    LC_IDENTIFICATION=“en_US.UTF-8”
    LC_ALL=

part of journald when system source /etc/profile.local :

juil. 27 16:49:39 15-5-G731GV systemd[2603]: Started D-Bus User Message Bus.
juil. 27 16:49:39 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2661]: hBc  - /etc/profile.local ---  -*-µ-*-µ- BEGIN -*-µ-*-µ-
juil. 27 16:49:39 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2666]: hBc  - /etc/profile.local --- [id] uid=1000(user_install) gid=100(users) groups=100(users) -- USER [id -nu] : user_install -- $USER : user_install -- PROFILE_LOG_USER : user_install
juil. 27 16:49:39 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2671]: hBc  - /etc/profile.local ---  RUNNING REAL MACHINE
juil. 27 16:49:39 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2672]: hBc  - /etc/profile.local ---  NON-INTERACTIVE
juil. 27 16:49:39 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2674]: hBc  - /etc/profile.local ---  BACKUP_SYS_SCRIPT_PATH : /backup_sys/000_COMMON
juil. 27 16:49:39 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2677]: hBc  - /etc/profile.local --- SOURCING : /backup_sys/000_COMMON/Bin/system_common_function
juil. 27 16:49:39 15-5-G731GV JCD_SYSTEM_COMMON_FUNC[2680]: /backup_sys/000_COMMON/Bin/system_common_function - ^^^ BEGIN ^^^ - USER : user_install
juil. 27 16:49:39 15-5-G731GV JCD_SYSTEM_COMMON_FUNC[2681]: /backup_sys/000_COMMON/Bin/system_common_function - SYSTEM_COMMON_FUNCTION_EXPORT : 1
juil. 27 16:49:39 15-5-G731GV JCD_SYSTEM_COMMON_FUNC[2684]: /backup_sys/000_COMMON/Bin/system_common_function  - ^^^ END  ^^^ - USER : user_install
juil. 27 16:49:39 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2689]: hBc  - /etc/profile.local --- NB system_common_function : 92
juil. 27 16:49:39 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2691]: hBc  - /etc/profile.local --- SOURCING : /backup_sys/000_COMMON/Bin/system_common_general_env_var
juil. 27 16:49:39 15-5-G731GV JCD_SYSTEM_COMMON_GEN_ENV[2694]: /backup_sys/000_COMMON/Bin/system_common_general_env_var - BEGIN - USER : user_install
juil. 27 16:49:40 15-5-G731GV JCD_SYSTEM_COMMON_GEN_ENV[2756]: /backup_sys/000_COMMON/Bin/system_common_general_env_var - SYSTEM_COMMON_GENERAL_ENV_VAR_EXPORT : 1
juil. 27 16:49:40 15-5-G731GV JCD_SYSTEM_COMMON_GEN_ENV[2759]: /backup_sys/000_COMMON/Bin/system_common_general_env_var - END - USER : user_install
juil. 27 16:49:40 15-5-G731GV JCD_ETC_PROFILE_LOCAL[2760]: hBc  - /etc/profile.local ---  -*-µ-*-µ- END -*-µ-*-µ-
juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable  "BASH_FUNC_abort_because_test%%" as name contains unsupported characters
juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable  "BASH_FUNC_abort_because_test_no_trap%%" as name contains unsupported characters
juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable  "BASH_FUNC_abort_by_user%%" as name contains unsupported characters
juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable  "BASH_FUNC_activate_all_repo_but_source_debug%%" as name contains unsupported characters
juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable  "BASH_FUNC_array_contains_element%%" as name contains unsupported characters
juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable  "BASH_FUNC_array_to_file%%" as name contains unsupported characters
juil. 27 16:49:40 15-5-G731GV startplasma-x11[2616]: org.kde.plasma.libkworkspace: Skipping syncing of environment variable  "BASH_FUNC_ask_YyNn%%" as name contains unsupported characters

Have you tried using “/etc/bash.bashrc.local” instead of “/etc/profile.local”?

I always use /etc/profile.local for years.

I’ll run a test on a virtual machine and keep you posted.

As far as I know, “/etc/profile.local” is only run for login shells, not for all shells. If you want a defined variable to persist over all shells, either define in “/etc/bash.bashrc.local” or export it to the environment.

1 Like

Thank you for your comment and I will take it into account from now on.

On a new 15.5 VM, I have made a test using my script in “/etc/bash.bashrc.local” and another test using my script in “/etc/profile.local”.
No problem and no errors.

I may have broken something on the other machine so I’ll have to reinstall it.
Sorry for the inconvenience
Thanks for your help.
Thread completed.