I’m trying to track down how the contents of the environment variable XDG_CONFIG_DIRS are assembled for a LXQt session (launched from Ly). (I’m experimenting on 26.05.)
So far I patched the xsession script created by nixpkgs/nixos/modules/services/x11/desktop-managers/lxqt.nix to get some debug outputs and the startlxqt script that gets exec’d. The build-up the paths in XDG_CONFIG_DIRSlooks fine.
But when I run cat /proc/$(pgrep -f "lxqt-session")/environ | tr '\0' '\n' | grep -a "XDG_CONFIG_DIRS", I get wildly different contents from what I get from startlxqt even immediately before it execs lxqt-session.
Even weirder: When I do echo $XDG_CONFIG_DIRS in e.g. ghostty, I get the contents as set in startlxqt. When I do the same in Guake (or ghostty launched from Guake), I get the contents from /proc/$(pgrep -f "lxqt-session")/environ.
On top of that what made me notice this difference: in /proc/$(pgrep -f "lxqt-session")/environ I get an invalid “path” added at the end of the variable:
> cat /proc/$(pgrep -f "lxqt-session")/environ | tr '\0' '\n' | grep -a "XDG_CONFIG_DIRS" | xxd
...
000001e0: 6231 727a 382d 7379 7374 656d 2d70 6174 b1rz8-system-pat
000001f0: 682f 7368 6172 653a f103 0a h/share:...
which in turn breaks cachix and nvd (both crashing due to invalid UTF-8).
Any ideas on how to further investigate this?