Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently switched across to nesting my home directory across all my machines in an svn repo, meaning that my utility scripts, configuration (irssi, vim, zsh, screen etc) as well as my .profile and so forth are easier to keep up to date across all the places I login.

I use a set of sourced .local files to override them on a per site basis as required.

As it stands, many of my scripts inherit some form of configuration, and for the most part I've been setting an environment variable in .profile, and then if needed on a per site basis overriding it in .profile.local

This works great, but are there pitfalls in having a stack of environment variables? If I take my default environment from within an X session before any of my personal configuration I have not even increased it by 50% but some of the machines I work on are low resource, am I bloating my system unneccessarily, or being needlessly paranoid?

Should I start moving this config into seperate flatfiles that are loaded as needed? This means extra infrastructure, or alternately writing a single module for storing config that all of my utilities can inherit.

share|improve this question
up vote 1 down vote accepted

I think you are being paranoid, as you say. What you describe seems like a pretty common setup among, er, "superusers". There is no penalty for setting and resetting environment variables several times (except very small execution time increase when you start a shell, of course). Heck, I have environment variables per directory.

share|improve this answer
Thanks peter. I'm refactoring a bunch of code at the moment and finding myself setting a stack of necessary environemnt variables (demanded by 3rd party applications) so I suddenly don't feel so bad about using them in my applications. – richo Dec 30 '10 at 15:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .