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: screen 4.0.3-5 does not respect $SHELL


> On 12/10/2010 18:00, Andrew Schulman wrote:
> >> Initially SHELL=/bin/bash when using a link in start menu.From initial bash prompt, i start screen, fresh session. There all kinds of bash misbehavior occur, including ~/.bashrc having no effect. Apparent reason for that is that $SHELL becomes /bin/sh instead of /bin/bash within screen.
> >> A workaround is to start screen asscreen -s /bin/bashor have shell specified in .screenrc. Then bash works as expected. That screen does not respect $SHELL seems to be a bug though.
> >> Thanks to jturney from #cygwin for helping me pinpoint the problem.
> >> -anna 		 	   		
> 
> The problem seems to be caused by the fact that bash sets SHELL, but does not 
> export it by default, so screen doesn't inherit it and sets SHELL=/bin/sh.

OK, I see.  And I do export SHELL in my bash startup scripts, so I don't have
this problem.

I can see two possible solutions:

(1) Tell users to export SHELL=/bin/bash if that's what they want processes
spawned by the shell to use.

(2) Add 'shell /bin/bash' into /etc/screenrc, on the theory that this should be
the default since bash is the default shell for Cygwin.  Users who wanted to use
a different shell could override it in their .screenrc files.

Any thoughts on which is the better solution?


--
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]