LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   enviroment variables (https://www.linuxquestions.org/questions/linux-from-scratch-13/enviroment-variables-260640/)

cphase 11-29-2004 03:51 PM

enviroment variables
 
I hope this is the correct place to ask this, while fooling around with LFS I inadvertantly changed my enviroment, now I can nolonger get into my home dir or run X. Is tere a way to reset my enviroment variables? TKS in advance

david_ross 11-29-2004 03:56 PM

How did you change them? If you just did it for your current session then just logout and back in again.

XavierP 11-29-2004 03:58 PM

Moved: This thread is more suitable in Linux From Scratch and has been moved accordingly to help your thread/question get the exposure it deserves.

cphase 11-29-2004 04:07 PM

I used the cat command that is in the setup for LFS but I was not in that dir so now my Slack env is changed and I cant get into my home dir or run X.

cphase 11-29-2004 04:11 PM

Below are the commands I issued that set the env:




cat > ~/.bash_profile << "EOF"
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
EOF

t > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
EOF

cphase 11-29-2004 08:03 PM

Doesn't look like moving this post to LFS forum is getting very much exposure!

tvburger 11-30-2004 01:00 PM

.bashrc
 
Normally your bash configured by the .bashrc file.

Probably your PATH is not correct to find the startx|xdm|whateverx program. Please send your .bashrc of your user (probably ~/.bashrc) and the output of "set" bash-builtin.

= Tom

Mr.McCormick 01-19-2005 03:15 PM

Quote:

Originally posted by cphase
Below are the commands I issued that set the env:




cat > ~/.bash_profile << "EOF"
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
EOF

t > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
EOF

i know this is a little old but this is your problem change you .bashrc file to read
...
PATH=/tools/bin:$PATH
...
when you set path it resets the env var
and you should use another user than your main so you dont mess with the main user


All times are GMT -5. The time now is 08:04 PM.