1

I get a lot of config folders in my homefolder. I assume that is, because $XDG_CONFIG_HOME is not set and some software (e.g. fontconfig, umlet) does not follow the standards.

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

Now since my distribution does not set it, I want to do it. Most of the internet comments recommend to write it in the bashrc. But I am the system administrator and want to do this for all users including future users, without introducing furture maintenance work.

This means I want to set it systemwide (globally) and since every new users should inherit it, it should be dynamically, using e.g. "$HOME/.config".

How can I solve this general problem in a reasonable way?

2

Insted of .bashrc put the setting line to /etc/profile. This file is loaded on every user login just like .bashrc is for a specific user. The bonus is this works for other shells and sessions as well.

  • Will $HOME be correctly expanded in /etc/profile? – ManuelSchneid3r Jun 11 '15 at 14:08
  • Should be, it is supposed to be executed by the login shell in the same fashion as .bashrc & friends. – mikky Jun 11 '15 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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