View previous topic :: View next topic |
Author |
Message |
sonofnet n00b
Joined: 05 Jan 2007 Posts: 16
|
Posted: Fri Jan 05, 2007 11:57 pm Post subject: User config files - to /home/user/.etc how? |
|
|
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 |
|
|
Moji Tux's lil' helper
Joined: 04 Nov 2006 Posts: 121
|
Posted: Sat Jan 06, 2007 12:45 am Post subject: |
|
|
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 |
|
|
Moji Tux's lil' helper
Joined: 04 Nov 2006 Posts: 121
|
Posted: Sat Jan 06, 2007 9:01 am Post subject: |
|
|
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
Hope that gives you at least one option to force programs to organize their config files.
-MJ |
|
Back to top |
|
|
sonofnet n00b
Joined: 05 Jan 2007 Posts: 16
|
Posted: Sat Jan 06, 2007 1:41 pm Post subject: |
|
|
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 |
|
|
|