Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm beginning to have a lot of .[program name]rc files in my home folder.

I wish i could create a folder to keep them all in, and then get every program to to look there. Is there an easy way to do this. Like changing a environment variable?

What do you do?

share|improve this question
1  
The ~/.config directory is part of the Freedesktop.org specification, so it really shouldn't contain config files for non-GUI applications. –  jordanm Jan 21 '13 at 16:51
    
Thanks! What do you do about your home folder filling up with config files? –  Fawkes5 Jan 21 '13 at 17:32
2  
Nothing, I don't see it as a problem. –  jordanm Jan 21 '13 at 17:54
    
@jordanm: why is ~/.config be reserved for GUI-applications only? I don't recall freedesktop.org make that restriction. Actually, I just checked. the basedir-spec seems standalone, is quite short and doesn't contain any restriction of that sort. –  Bananguin Jan 22 '13 at 10:49

1 Answer 1

There is an application called libetc that attempts to deal with this issue:

It is a LD_PRELOAD-able shared library that intercepts file operations: if a program tries to open a dotfile in $HOME, it is redirected to $XDG_CONFIG_HOME (as defined by freedesktop).

You can then store all your config files in $XDG_CONFIG_HOME instead of using zillions dotfiles in $HOME

It hasn't been updated in a while and may cause unintended side-effects, so use with caution. There is a page on the Arch Wiki and an AUR package.

share|improve this answer
    
Cool. Thats exactly the kind of thing i'm after. You've helped me on the Arch forums before :). Thank you! –  Fawkes5 Jan 21 '13 at 18:45
    
No problem; hope it works out for you. –  jasonwryan Jan 21 '13 at 19:58
    
The "it hasn't been updates in a while" and the suggestion "install a random preloaded library" just gives me the willies.... People, if you value your sanity, install what your distribution provides. Keeping track of vulnerabilities, updates, and integration into your everchanging environment for a random assortment of stuff downloaded from who knows where is just self-inflicted pain. –  vonbrand Jan 22 '13 at 20:23

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.