I am using Ubuntu 9.1 (Karmic Koala) on my server.
A simple matter of setting environment variables so that they are globally available across all processes is driving me crazy and I'd appreciate some help!
I've tried setting them by using the export command in several different 'usual suspect' locations such as .bashrc, .bashrc, .profile. These work great for the shell itself and processes forked off the shell but not for processes started outside the shell (for example daemons kicked off at boot time or particularly annoying for me is that Mongrel launched by Capistrano doesn't seem to have these variables set and hence Ruby doesn't have access to them).
I've also tried some crazy ideas like setting them in a shell script and calling this script during boot time (via the update-rc.d method) to no avail.
In Windows, one can simply define a "system variable" which becomes available across all processes in the OS. How does one do this in Linux; specifically Debian based OS?