PDA

View Full Version : [SOLVED] terminal enviornment variables



cpgos
December 19th, 2011, 06:03 PM
Could somebody please explain how to get the following command to run when I open a terminal window in Ubuntu 11.10:

source /opt/intel/bin/compilervars.sh ia32

This command is needed to set the environment variables for an Intel Fortran compiler that I want to use.


Best regards,
cpgos

Lars Noodén
December 19th, 2011, 06:14 PM
It should run just as you have written it. Does /opt/intel/bin/compilervars.sh exist? What's the output of this:



ll /opt/intel/bin/compilervars.sh

cpgos
December 19th, 2011, 11:38 PM
Lars Nooden,
Thank you for your response.

/opt/intel/bin/compilervars.sh exists in the folder where the Intel compiler is installed. When I enter and run this command manually no errors or messages are generated but the compiler operates as required.

I would like to avoid having to do this each time and instead have the command implemented automatically when I open a terminal.

There seems to be some way do do this via the edit\preferences menu but it is not clear to me how to do so.

Best regards,
cpgos

Lars Noodén
December 20th, 2011, 08:35 AM
You could try putting it in .bashrc so that it will run every time you open the terminal.

cpgos
December 22nd, 2011, 10:48 AM
Lars Nooden,
I have done as you suggested and the terminal now responds as required.

Best regards,
cpgos