X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Message-ID: <4CB5C2D1.6010702@dronecode.org.uk> Date: Wed, 13 Oct 2010 15:31:45 +0100 From: Jon TURNEY User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: schulman.andrew-65bELFHSwm+NwwpopWmoRw AT public DOT gmane DOT org Subject: Re: screen 4.0.3-5 does not respect $SHELL References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 > > Hm... odd. I'm not able to reproduce this. I have SHELL=/bin/bash both > inside and outside of screen, and I haven't adjusted it either on the > command line or in .screenrc. /etc/screenrc doesn't set it either. > > Can anyone else verify this? I can reproduce this problem. 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. jon AT byron ~ $ echo $SHELL /bin/bash jon AT byron ~ $ export -p | grep SHELL jon AT byron ~ $ screen jon AT byron ~ $ echo $SHELL /bin/sh -- 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