I installed ROOTv5.34.03 and it comes with a script to set the necessary environment variables. The installation guide tells me to just run the script but that only sets the environment for that shell. I would like to have the environment set system wide. I found that running the script from bash_completion works as far as I can tell. Is this an acceptable solution, is there a better way? I am using ubuntu 12.10 64-bit. Also the script sets LD_LIBRARY_PATH so I can't place it in many common locations or else LD_LIBRARY_PATH gets erased.


I think that /etc/profile is a better place if you want it for all users in the system. An other good place is to add it to /etc/profile.d/, just make sure that it ends with a .sh.

  • I have tried that but it requires that I define the LD_LIBRARY_PATH variable in etc/ld.so.conf.d/*.conf. I would rather have a single change in case I need to erase or change the variable values. But I guess I'm asking if my solution is harmful I'm any way. – Fred Dec 29 '12 at 22:47
  • If you want to change the values I would recommend ~/.bashrc That file get sourced every time you start a new shell. – McNisse Dec 29 '12 at 22:57
  • Well then putting the script in bash_completion should be fine as out gets used at the end of ~/.bashrc, right? – Fred Dec 30 '12 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.