This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GNU screen not seeing $SHELL env var?


On Wed 6/20/12 8:07 MDT Eric Blake wrote:
> On 06/20/2012 07:20 AM, Tom Rodman wrote:
> 
> >   $ echo $SHELL
> >   /bin/bash
> >   $ bash -c 'echo SHELL: $SHELL'  # does this prove SHELL is exported?
> >   SHELL: /bin/bash
> 
> No.  And in fact, bash does not export SHELL by default, but defaults to
> defining SHELL as a shell-local variable.  You have to explicitly export
> it yourself if you want child processes to see it.

OK. Thanks, good to know that.

--
Still, not sure why I have to export the SHELL var to GNU screen
now since in the past several years I have not done this.
Recently I stopped using 'putty -ssh localhost' for my terminal,
and I'm using 'rxvt' instead, but I can not see why that would
matter.  In Linux, 'screen' sets up login shells correctly, I
use the same ~/.screenrc for both cygwin and linux, and I'm not
exporting SHELL to screen in linux.

Non cygwin question: what is the best way to tell GNU screen to
read /etc/passwd to get SHELL, and start all new screen windows
with login shells?

--
thanks,
Tom



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]