143 reputation
16
bio website
location Cambridge, United Kingdom
age 33
visits member for 4 years, 10 months
seen Aug 26 '13 at 10:27

Jan
18
awarded  Supporter
Sep
19
awarded  Revival
May
28
awarded  Notable Question
Mar
1
awarded  Teacher
Mar
1
answered net.tcp Listener Adapter and net.tcp Port Sharing Service not starting on reboot
Jan
24
awarded  Popular Question
Aug
19
awarded  Student
Mar
4
comment Setting environment variables in Linux for all processes
The proposed solution works great! However, this is not exactly what I was hoping. This still means that system daemons such as CRON, SSH both of which I am using to execute scripts/commands that rely on my custom variables will not work. Suppose I want to execute a command over SSH saying 'less $CORELOGGER/Masterlog', it will not work unless I source my loglocation.sh wrapper before EVERY daemon including system daemons gets initialized. Bit painful this.
Mar
4
awarded  Scholar
Mar
4
accepted Setting environment variables in Linux for all processes
Feb
23
comment Setting environment variables in Linux for all processes
Exactly what I am trying to do is set a few variables that point to different folders used by applications and scripts. For example, one such folder points to where my webapp is deployed on the server. This is then used across different applications such as Stunnel daemon, Rsync configuration file, Bash scripts that are called by my Ruby-on-rails webapp (which incidentally doesn't see the variables because the Mongrel app-server that forks ruby gets spawned over ssh and is not started over a logged-in terminal session. If I start Mongrel from a shell on the server, ruby sees the variables).
Feb
23
comment Setting environment variables in Linux for all processes
thanks for migrating this question. This is indeed a better place for such questions
Feb
23
comment Setting environment variables in Linux for all processes
I am not trying to modify env variables inside a process. I just want to make a bunch of settings available across disconnected applications that I have created. For example, if you have 3 different apps all logging to a $MY_CUSTOM_LOG_LOCATION folder, then having this variable defined such that it is available 'globally' makes sense. If all 3 processes are launched from a shell, then setting this variable in .bashrc works but if one of them is a daemon kicked off at boot time, then that process does not see the variable being set in .bashrc.
Feb
22
asked Setting environment variables in Linux for all processes