
Hi, I am running Red Hat 7, kernel 2.4.9. I am using KDE. I believe I am using the bash shell. Recently I have set up a couple of extra environment variables in the /etc/profile file. They all seem to work fine except the one called LD_LIBRARY_PATH. When I login from the initial login screen and subsequently start a shell the variable is available in that environment. However, if from that shell I then type "su" and become root, the LD_LIBRARY_PATH variable is not available in the new environment, but all the other environment variables appear to be. If I then logout completely and login as root from the initial screen and start a shell then again the LD_LIBRARY_PATH variable is available there. Here is a snippet of the /etc/profile file: # Define the Optimizeit home directory. OPTIMIZEIT_HOME=/home/Roger02/OptimizeitSuite export OPTIMIZEIT_HOME # Set up the library path for Optimizeit LD_LIBRARY_PATH=$OPTIMIZEIT_HOME/lib export LD_LIBRARY_PATH Can anyone please tell me why the LD_LIBRARY_PATH variable is not universally available? Is LD_LIBRARY_PATH a reserved variable that requires some extra configuration to make it universally available? Or have I just done something silly? Note OPTIMIZEIT_HOME was a new variable at the same time as LD_LIBRARY_PATH and is available in all shells that I have tried. I have also tried logging out and in and restarting numerous times. Any pointers would be appreciated. Thanks in anticipation Roger

Hi,
I am running Red Hat 7, kernel 2.4.9. I am using KDE. I believe I am using the bash shell. Recently I have set up a couple of extra environment variables in the /etc/profile file. They all seem to work fine except the one called LD_LIBRARY_PATH. When I login from the initial login screen and subsequently start a shell the variable is available in that environment. However, if from that shell I then type "su" and become root, the LD_LIBRARY_PATH variable is not available in the new environment, but all the other environment variables appear to be. If I then logout completely and login as root from the initial screen and start a shell then again the LD_LIBRARY_PATH variable is available there. Here is a snippet of the /etc/profile file:
Hi Roger, The answer is "su -". This will give you root's environment as well. Hope that helps. Regards, -- Greig McGill
participants (2)
-
Greig McGill
-
Roger