environment: ignore env var assignments > 1 KiB (#2325)

...to guard against recursive constructs like FOO=$FOO:bar which would
grow on each reconfigure.

Add log message as well as a warning against this in the man page.
This commit is contained in:
Johan Malm 2024-11-10 20:40:51 +00:00 committed by GitHub
parent fc774d0071
commit a88c721979
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 3 deletions

View file

@ -50,9 +50,14 @@ that directory contains either the "environment" file or at least one
Note: environment files are treated differently by Openbox, which will simply
source the file as a valid shell script before running the window manager. Files
are instead parsed directly by labwc, although any environment variables
referenced as $VARIABLE or ${VARIABLE} will be substituted and the tilde (~)
will be expanded as the user's home directory.
are instead parsed directly by labwc so that environment variables can be
re-loaded on --reconfigure.
Any environment variables referenced as $VARIABLE or ${VARIABLE} will be
substituted and the tilde (~) will be expanded as the user's home directory.
Please note that as labwc reloads the environment file(s) on reconfigure,
recursive/circular assignments (for example FOO=$FOO:bar) should not be made.
The *autostart* file is executed as a shell script after labwc has read its
configuration and set variables defined in the environment file. Additionally,