If you are installing X while in a chroot environment in another system, then I would not expect those environment variables to survive a reboot. And the scripts in /etc/profile.d are called by /etc/profile when the system boots, which it is not doing if you are chroot-ing into it. That's my best guess at what is happening. It all sounds normal to me.
I recommend that you not build X in chroot. Instead, take a few minutes to install Lynx (a text browser that can be used to read the BLFS book), GPM (mouse daemon that lets you highlight, copy, paste the LFS book), and Wget (to download packages via the scripts in the X steps). Then reboot the system for real and work in the native environment. It's what the LFS book (in chapter 9) and most everyone around here recommends.
Last edited by stoat; 03-13-2013 at 08:16 PM.