LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   $PATH enviroment variable in xterm (https://www.linuxquestions.org/questions/linux-from-scratch-13/%24path-enviroment-variable-in-xterm-572765/)

Vitalie Ciubotaru 07-27-2007 11:34 AM

$PATH enviroment variable in xterm
 
xterm's $PATH setting differs from the console $PATH. In console, bash reads /etc/profile, ~/.bash_profile and other config files and sets its enviroment variables. In xterm, bash sets $PATH to "/etc:/bin:/usr/bin:/usr/X11R6/bin:/usr/ucb", which is very strange to me.
Why is it so? Where is this setting from? How can I change it?

A lot of other environment variables [like $PS1] are just missing. This is not a big deal, I can always do "source /etc/profile" and "source ~/bash_profile" to get my variables back, but there must be a way to set them permanently.

Any hints?

wjevans_7d1@yahoo.co 07-27-2007 01:13 PM

Put what you need into .bashrc in your home directory.

For more information on which bash configuration files are used when, do this at the command prompt:

Code:

man bash
Hope this helps.

Vitalie Ciubotaru 07-31-2007 05:08 PM

Oh Thanks a lot!!!
It's only now that I see the difference between login and non-login shell. It's solved!
Thanks again.

Vitalie CIUBOTARU


All times are GMT -5. The time now is 01:11 PM.