* screen 4.0.3-5 does not respect $SHELL
@ 2010-10-12 16:26 Anna Z.
2010-10-12 17:00 ` Andrew Schulman
0 siblings, 1 reply; 6+ messages in thread
From: Anna Z. @ 2010-10-12 16:26 UTC (permalink / raw)
To: cygwin
Hello.
I'm experiencing the following issue.
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
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: screen 4.0.3-5 does not respect $SHELL
2010-10-12 16:26 screen 4.0.3-5 does not respect $SHELL Anna Z.
@ 2010-10-12 17:00 ` Andrew Schulman
2010-10-13 14:31 ` Jon TURNEY
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Schulman @ 2010-10-12 17:00 UTC (permalink / raw)
To: cygwin
> 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?
A.
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: screen 4.0.3-5 does not respect $SHELL
2010-10-12 17:00 ` Andrew Schulman
@ 2010-10-13 14:31 ` Jon TURNEY
2010-10-13 15:22 ` Andrew Schulman
0 siblings, 1 reply; 6+ messages in thread
From: Jon TURNEY @ 2010-10-13 14:31 UTC (permalink / raw)
To: cygwin; +Cc: schulman.andrew-65bELFHSwm+NwwpopWmoRw
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@byron ~
$ echo $SHELL
/bin/bash
jon@byron ~
$ export -p | grep SHELL
jon@byron ~
$ screen
jon@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: screen 4.0.3-5 does not respect $SHELL
2010-10-13 14:31 ` Jon TURNEY
@ 2010-10-13 15:22 ` Andrew Schulman
2010-10-13 15:29 ` Eric Blake
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Schulman @ 2010-10-13 15:22 UTC (permalink / raw)
To: cygwin
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: screen 4.0.3-5 does not respect $SHELL
2010-10-13 15:22 ` Andrew Schulman
@ 2010-10-13 15:29 ` Eric Blake
2010-10-13 15:32 ` Eric Blake
0 siblings, 1 reply; 6+ messages in thread
From: Eric Blake @ 2010-10-13 15:29 UTC (permalink / raw)
To: cygwin
On 10/13/2010 09:22 AM, Andrew Schulman wrote:
>> 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.
(3) teach upstream screen that it should use getpwent() and honor the
pw_shell entry for the user, rather than relying on $SHELL
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-13 15:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-12 16:26 screen 4.0.3-5 does not respect $SHELL Anna Z.
2010-10-12 17:00 ` Andrew Schulman
2010-10-13 14:31 ` Jon TURNEY
2010-10-13 15:22 ` Andrew Schulman
2010-10-13 15:29 ` Eric Blake
2010-10-13 15:32 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).