LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-25-2007, 10:05 PM   #1
cad
Member
 
Registered: Dec 2006
Distribution: Fedora core 4
Posts: 92

Rep: Reputation: 15
custom environment variables


How do I change my env variables like color and MAIL=/var/spool/usersname/mail to MAIl=~/mail
and other changes and in what file
 
Old 01-25-2007, 11:28 PM   #2
cad
Member
 
Registered: Dec 2006
Distribution: Fedora core 4
Posts: 92

Original Poster
Rep: Reputation: 15
Please also tell me how to change the HOME so that I can log in to my X using two or more different sets of settings
 
Old 01-26-2007, 12:07 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can make some changes such as the value of MAIL in your ~/.bash_profile or ~/.profile script depending on which you prefer to use. This assumes you use the bash shell as your default. You can also use the ~/.bashrc script to do this. For some things, like 'PATH=$PATH:/another/path/' is is better to use ./.bash_profile or ~/.profile and not ~/.bashrc so that the script is only run once when you login.

The HOME variable contains which home directory you use. It is determined from the /etc/passwd file when you login. You might be thinking of profiles instead, which your distro may support. I don't really understand what you want to do in the second part of your second question. You could create a second user who would have different settings. You may have desktop settings different, which are saved in ~/.kde/ for the kde desktop.
Some applications allow using different profiles. Such as firefox or konqueror. You could have a common Documents partition or directory that is linked to by the Documents folder of more than one user, and use group access so that you have the same Documents directory regardless of which of your own usernames you log into.
 
Old 01-26-2007, 05:39 AM   #4
cad
Member
 
Registered: Dec 2006
Distribution: Fedora core 4
Posts: 92

Original Poster
Rep: Reputation: 15
the second part actually is asked because I am allowed only one account
 
Old 01-26-2007, 06:00 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
What types of settings are you talking about?

Do you log into the console and then execute "startx"?

I don't know if the HOME variable is read by kde or gnome to determine your home directory. It might be an interesting experiment to:
  1. Create a directory in your home directory (i.e. ~/home/home2)
  2. Copy needed files and directories there: (i.e. cp -R ~/.bashrc ~/.profile .xinitrc ~/Desktop ~/home/home2
  3. log out of kde.
  4. run "HOME=$HOME/home2 startx"

If anything uses /etc/passwd to determine your home directory, then things may break down fast.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting all environment variables Harlin Linux - General 2 10-06-2006 12:30 PM
environment variables in c++ s3b0 Programming 6 08-27-2004 09:19 AM
Environment Variables if you su concoran Linux - Newbie 1 08-16-2002 07:18 PM
environment variables. jISV Linux - General 0 04-05-2002 06:01 AM
environment variables aethereal Linux - Newbie 7 12-19-2001 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:06 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