Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have this question, is posible to change the default location for hidden personal config folders from /home/user to another location? I mean the folders .cache ..compiz-1 etc.

Thanks for answering.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

No, unfortunately, it's not possible yet. There is something called the XDG Base Directory Specification which makes certain types of directories configurable, including where apps store their data, where their configs are, etc. It says that configuration files should be placed in a directory specified by the variable $XDG_CONFIG_DIRS, which is $HOME/.config by default, but many applications doesn't use that yet. This is very annoying for many reasons. When they do, then it will be possible by simple changing that variable to something else, like $XDG_CONFIG_DIRS=/somewhereelse/.config. For now, it is not possible for things like compiz, but it is possible for many other things.

share|improve this answer

Actually there is a command usermod(8) that can change your home directory. This will move all of your files, not just the dot files you listed above

NEWDIR=/new/home/dir
USER=yourusername
sudo usermod --move-home --home $NEWDIR $USER

Try "man usermod" for more information.

If you wanted to just move certain directories, you could create (and maintain) symbolic links, something like this bash snippet:

NEWDIR=/new/home/dir
DIRSTOMOVE=".adobe .cache .compiz ..."
for d in $DIRSTOMOVE; do
    mv $HOME/$d $NEWDIR && ln -s $NEWDIR/$d $HOME
done
share|improve this answer
    
Good to know. Taking note of this info. Thanks qniell. –  Bruno Pablo Nov 1 '11 at 2:49

The short answer is no. There are lots of programs that use this area as a default for writing config files. I just checked on my system and I have folders like .adobe, .dropbox, .libreoffice and .shotwell. Not to mention a huge number of program configs in .config.

Basically, even if you managed to change the defaults for one application, there are more that would still write there. There's no global default for user config location.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.