Whenever I start my BSPWM session, and regardless of how I start it (I have tested LightDM and Startx), I find that environment variables are somehow not being propagated as expected to X clients during that session.
I have checked the contents of /proc/$( pgrep bspwm )/environ, and it appears the BSPWM process itself does have the expected environment variables. However, once the X session is started, X clients (such as my terminal emulator) do not have the expected environment variables set.
This is quite a weird problem and I'm not sure how to go about debugging it. Is there any obvious configuration problem that I am overlooking?
Here is my very basic ~/.xinitrc script:
#!/bin/sh
# Set a bunch of environment variables
. ~/.config/envrc
# Copy some useful elements from my distro's xinit script
. /etc/X11/xinit/xinitrc.d/50-systemd-user.sh
. /etc/X11/xinit/xinitrc.d/xdg-user-dirs.sh
if test -r $HOME/.nvidia-settings-rc && type -p nvidia-settings > /dev/null
then
nvidia-settings --load-config-only > /dev/null 2>&1 &
fi
# Load Xresources for various programs
xrdb -I $HOME -merge ~/.Xresources
# Run my window manager
exec /usr/bin/bspwm "$@"
In case it's relevant, I am currently using Opensuse Tumbleweed, and I have not adjusted the default PAM configuration in any way. And, from what I remember, I have also had this problem on Debian under Herbstluftwm. So I don't think it's a BSPWM-specific or Suse-specific problem.