Aha, I found the fopen problem and fixed it. I also changed the OpenGL system to use software rendering. /etc/profile fixed and /root/.bashrc removed. Is the LXDE problem fixed? Any other problems?