LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-29-2004, 03:51 PM   #1
cphase
Member
 
Registered: Dec 2003
Location: Newnan, GA
Distribution: Archlinux
Posts: 77

Rep: Reputation: 15
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
 
Old 11-29-2004, 03:56 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
How did you change them? If you just did it for your current session then just logout and back in again.
 
Old 11-29-2004, 03:58 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
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.
 
Old 11-29-2004, 04:07 PM   #4
cphase
Member
 
Registered: Dec 2003
Location: Newnan, GA
Distribution: Archlinux
Posts: 77

Original Poster
Rep: Reputation: 15
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.
 
Old 11-29-2004, 04:11 PM   #5
cphase
Member
 
Registered: Dec 2003
Location: Newnan, GA
Distribution: Archlinux
Posts: 77

Original Poster
Rep: Reputation: 15
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
 
Old 11-29-2004, 08:03 PM   #6
cphase
Member
 
Registered: Dec 2003
Location: Newnan, GA
Distribution: Archlinux
Posts: 77

Original Poster
Rep: Reputation: 15
Doesn't look like moving this post to LFS forum is getting very much exposure!
 
Old 11-30-2004, 01:00 PM   #7
tvburger
LQ Newbie
 
Registered: Nov 2004
Location: the Netherlands
Distribution: gentoo/ubuntu
Posts: 11

Rep: Reputation: 0
.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
 
Old 01-19-2005, 03:15 PM   #8
Mr.McCormick
LQ Newbie
 
Registered: Aug 2004
Location: Redford, MI
Distribution: lfs 6.0-testing-20040913/ blfs 5.1 modifyed
Posts: 10

Rep: Reputation: 0
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

Last edited by Mr.McCormick; 01-19-2005 at 03:17 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I see all the enviroment variables? zvonSully Linux - Software 3 02-09-2005 07:39 AM
Enviroment variables johnnydangerous Fedora 3 02-07-2005 05:45 AM
Where to set enviroment variables vavoem Linux - Software 7 09-07-2004 01:13 AM
setting enviroment variables unimaginative Linux - General 5 01-08-2004 01:22 AM
how to set enviroment variables RedHat123 Linux - Newbie 1 07-16-2002 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration