Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
User config files - to /home/user/.etc how?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
sonofnet
n00b
n00b


Joined: 05 Jan 2007
Posts: 16

PostPosted: Fri Jan 05, 2007 11:57 pm    Post subject: User config files - to /home/user/.etc how? Reply with quote

Guy, is it possible to make gentoo install all user config files not into the /home/user/ but to /home/user/.etc?
Back to top
View user's profile Send private message
Moji
Tux's lil' helper
Tux's lil' helper


Joined: 04 Nov 2006
Posts: 121

PostPosted: Sat Jan 06, 2007 12:45 am    Post subject: Reply with quote

I think that the programs install their own individual config files based on the ${HOME} variable.
So you could fool them by declaring the variable to the ~/.etc file. This seems to work for most files that just use your home parth to install their configs. There are some that as for your installation directory and seem to use your username as a base (the gimp), but since they ask you can install to ~/.etc anyways.

Code:
export HOME=${HOME}/.etc


or

Code:
export HOME=/home/[YourUserName]/.etc


There is a file that declares your enviromental variables for each shell (bashrc or bash_profile), I've got to run right now but I'll finish finding it tonight.

-MJ
Back to top
View user's profile Send private message
Moji
Tux's lil' helper
Tux's lil' helper


Joined: 04 Nov 2006
Posts: 121

PostPosted: Sat Jan 06, 2007 9:01 am    Post subject: Reply with quote

I can't mange to find the file that fills the env variables for ${HOME}. But if you want to change it there are a few options:

1. Add it to your /home/[User]/.bashrc
Code:
export HOME=/home/[User]/.etc

2. Change it each time manualy.
Code:
export HOME=/home/[User]/.etc

3. Have it export in the start-up of your window manager.
Code:
export HOME=/home/[User]/.etc

4. When create a user account you can add the -d switch so that you can set the home directory.
Code:
useradd [User] -d /home/[User]/.etc

5. You can do a usermod to change the user directory.
Code:
usermod [User] -d /home/[User]/.etc


If you changed your login directory using either useradd or usermod but didn't want all of your shells to actually start out there then you could always add to your /home/[User]/.etc/.bashrc
Code:
cd /home/[User]


Hope that gives you at least one option to force programs to organize their config files.

-MJ
Back to top
View user's profile Send private message
sonofnet
n00b
n00b


Joined: 05 Jan 2007
Posts: 16

PostPosted: Sat Jan 06, 2007 1:41 pm    Post subject: Reply with quote

Huh, thats a nifty thing! Thanks a lot!
BTW, I like the idea to set it up everytime I install smth, cause I can force for example xfce to put its files to the /home/usr/.etc/xfce - I think its pretty cool.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum