[PATCH 0/1] MR11680: ntdll: Add LS_COLORS to ignored env vars
``` $ wc -c <<<"$LS_COLORS" 1807 ``` This one variable alone can use a crazy amount of space. I doubt there's a Windows app that would use this variable, and it helps with https://bugs.winehq.org/show_bug.cgi?id=1490 (it lets SmartSuite's FLW start). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11680
From: Ken Sharp <sharp_ken@hotmail.com> --- dlls/ntdll/unix/env.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index b082de626d3..d29b6a8a202 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -349,7 +349,8 @@ static BOOL is_special_env_var( const char *var ) */ static BOOL is_ignored_env_var( const char *var ) { - return (STARTS_WITH( var, "NIXPKGS_" ) || + return (STARTS_WITH( var, "LS_COLORS" ) || + STARTS_WITH( var, "NIXPKGS_" ) || STARTS_WITH( var, "QT_" ) || STARTS_WITH( var, "SDL_AUDIODRIVER=" ) || STARTS_WITH( var, "SDL_AUDIO_DRIVER=" ) || -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11680
This was already rejected in the mentioned bug. Apps that need a tiny environment can be run with `env -i`. The 16-bit environment could also conceivably be handled differently. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11680#note_149003
This merge request was closed by Alexandre Julliard. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11680
This was already rejected in the mentioned bug. Apps that need a tiny environment can be run with `env -i`. The 16-bit environment could also conceivably be handled differently.
In general, yes, but is there a reason to propagate LS_COLORS? I don't see how it would ever be helpful to propagate, and this does let a lot of things work out of the box... -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11680#note_149015
On Sun Aug 16 18:32:21 2026 +0000, Elizabeth Figura wrote:
This was already rejected in the mentioned bug. Apps that need a tiny environment can be run with `env -i`. The 16-bit environment could also conceivably be handled differently. In general, yes, but is there a reason to propagate LS_COLORS? I don't see how it would ever be helpful to propagate, and this does let a lot of things work out of the box... You beat me to it.
There's no reason not to exclude it. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11680#note_149016
On Sun Aug 16 18:32:21 2026 +0000, Ken Sharp wrote:
You beat me to it. There's no reason not to exclude it. The bug says that 2K of environment is already too much, it's futile to try to achieve that by removing a single variable. My environment is >2K and I don't even have LS_COLORS...
If we really want to make these things work out of the box we have to build a fake environment on the 16-bit side. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11680#note_149017
My environment is \>2K and I don't even have LS_COLORS...
For what it's worth, I have 3427 bytes of environment with LS_COLORS, 1510 without, and that's all stock variables except for one which totals 17 bytes. Though that does show it's clearly unreliable, and building a 16-bit environment from scratch is a better solution. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11680#note_149020
participants (4)
-
Alexandre Julliard (@julliard) -
Elizabeth Figura (@zfigura) -
Ken Sharp -
Ken Sharp (@imwellcushtymelike)