From: Rob Biedenharn Date: 2008-12-20T03:25:57+09:00 Subject: Re: .profile in UNIX On Dec 19, 2008, at 12:47 PM, Rodrigo Bermejo wrote: > Bob Smyph wrote: >> Tim Greer wrote: >>> >>> Sorry, I got you. I read the post too quickly and for some reason I >>> thought you said .plan (I should have known that sounded strange). >>> Indeed, the .profile is only set to work with shell, in the shell >>> env, >>> which is why CGI, web server APIs/modules and rails don't read >>> it. Did >>> you need to set any environments or did you want to emulate or >>> somehow >>> use the shell vars naturally (assuming you can trust the >>> user's .profile)? >> >> If the only way to get this to work is to set the environment/ >> variables >> or emulate them somehow in the Ruby script, that is what we will >> need to >> do. Any idea as how to do this? > > You can 'source' the .profile in your ssh session doing a: > cmd=". /home/user/.profile" > > note the space after the dot. > > Regards. Read the docs about the intended use and behavior of ~/.profile or ~/.login or ~/.bash_login compared to ~/.bashrc It's probably in the INVOCATION section of the manual for your shell. -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com