From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18646 invoked by alias); 13 Oct 2010 15:22:44 -0000 Received: (qmail 18634 invoked by uid 22791); 13 Oct 2010 15:22:43 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Oct 2010 15:22:37 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P639y-0000x9-Op for cygwin@cygwin.com; Wed, 13 Oct 2010 17:22:30 +0200 Received: from c-69-140-35-173.hsd1.md.comcast.net ([69.140.35.173]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Oct 2010 17:22:30 +0200 Received: from schulman.andrew by c-69-140-35-173.hsd1.md.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Oct 2010 17:22:30 +0200 To: cygwin@cygwin.com From: Andrew Schulman Subject: Re: screen 4.0.3-5 does not respect $SHELL Date: Wed, 13 Oct 2010 15:22:00 -0000 Message-ID: References: <4CB5C2D1.6010702@dronecode.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2010-10/txt/msg00316.txt.bz2 > 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