Re: Where to put environment variables?
hmm. what vineet says is true. ofcourse they should all be exported! man bash and look under INVOCATION. FILES section tells you when /etc/profile, ~/.bash_profile adn ~/.bashrc are read. one simple way to test is echoing something different in each of /etc/profile and .bash_profile. see which of the messages appears!! :) in the shell where you say env variables are not reflected. solong Vineet Kumar wrote: * Joao Clemente [EMAIL PROTECTED] [20030227 18:16 PST]: On Friday 28 February 2003 01:06, praveen kallakuri wrote: your console may not be spawning a login shell. thats when /etc/profile is not read (in other words, /etc/profile is read when you spawn a login shell). trying using a standard terminal. or alternatively, put your environment variables in .bashrc in your HOME. and source .bashrc in your .bash_profile. I think that is not the problem I'm facing: When I start kde through startx my konsole has the enviroment set up properly. When I start kde through kdm, the same console does not have the environment set up. If I had the problem you talk about, I would face it either way, right? Nope. When you log in at the console, that's your login shell. Any sub-processes (including your entire X session) inherit the environment from the parent process, in which the variable has been set. good times, Vineet -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Where to put environment variables?
I would like to add a JAVA_HOME variable as some of my apps seem to like it... I was doing this by exporting it in /etc/profile and it was ok. I was using my system loging in at console and then doing startx. Today I decided to startup kdm (/etc/init.d/kdm start) and when I logged from there I notisted that the konsoles I opened didn't had the environment variables I specified. So I think kdm does not reads /etc/profile and then every think that is started by kdm also does not get those settings. What is the correct way to add environment variables then? Thank you Joao Clemente -- Joao Pedro Clemente jpcl @ rnl.ist.utl.pt (when not working out) (when not sleeping) (when not surfing) (when not ... ;) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Where to put environment variables?
On Thursday 27 February 2003 10:58 pm, Joao Pedro Clemente wrote: What is the correct way to add environment variables then? Here's my setup... # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin BASH_ENV=$HOME/.bashrc export USERNAME BASH_ENV PATH = Regards, Jeff Elkins http://www.elkins.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Where to put environment variables?
On Friday 28 February 2003 01:06, praveen kallakuri wrote: your console may not be spawning a login shell. thats when /etc/profile is not read (in other words, /etc/profile is read when you spawn a login shell). trying using a standard terminal. or alternatively, put your environment variables in .bashrc in your HOME. and source .bashrc in your .bash_profile. I think that is not the problem I'm facing: When I start kde through startx my konsole has the enviroment set up properly. When I start kde through kdm, the same console does not have the environment set up. If I had the problem you talk about, I would face it either way, right? Thank you for your reply Joao Clemente -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning. - Richard Cook -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Where to put environment variables?
* Joao Clemente [EMAIL PROTECTED] [20030227 18:16 PST]: On Friday 28 February 2003 01:06, praveen kallakuri wrote: your console may not be spawning a login shell. thats when /etc/profile is not read (in other words, /etc/profile is read when you spawn a login shell). trying using a standard terminal. or alternatively, put your environment variables in .bashrc in your HOME. and source .bashrc in your .bash_profile. I think that is not the problem I'm facing: When I start kde through startx my konsole has the enviroment set up properly. When I start kde through kdm, the same console does not have the environment set up. If I had the problem you talk about, I would face it either way, right? Nope. When you log in at the console, that's your login shell. Any sub-processes (including your entire X session) inherit the environment from the parent process, in which the variable has been set. good times, Vineet -- http://www.doorstop.net/ -- Computer Science is no more about computers than astronomy is about telescopes. -- E.W. Dijkstra signature.asc Description: Digital signature