Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-Id: <200308151622.RAA01071@aps5.ph.bham.ac.uk> Date: Fri, 15 Aug 2003 17:21:15 +0100 (BST) From: "Dr.D.J.Picton" Reply-To: "Dr.D.J.Picton" Subject: Various shell problems To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: /oMKR3VtZFT6HSXGVOs09Q== 1. I downloaded the new version of base-files (2.0-2) today. I note that the new config files now go into the /etc/defaults directory, which is a good idea! Although it does have one disadvantage - if there are problems in the new files, many existing users won't see them. Unfortunately, I did notice problems with /etc/profile: Firstly, it sets stty erase ^? In my view the correct setting is definitely ^h (backspace). Setting the erase character to ^? (delete) causes problems when 'normal' terminal i/o is used. The delete key doesn't seem to work in a Windows command window, and a resource (deleteIsDel) has to be set to make it work in an xterm window. Secondly, the section which checks whether the user's passwd entry has been set up uses nonstandard operators (==) which aren't supported by all sh-like shells. This is what happens when profile is sourced by /bin/sh: [: ==: unknown operand I changed == to =, and now all is well. 2. SHELL environment variable problem. For some reason, the bash shell tends to drop the SHELL variable from the environment, causing a variety of problems. I fixed this with a new startup script (/etc/bash.bash_env) which issues 'export SHELL', and by contriving (via the BASH_ENV environment variable and .bashrc scripts) that all bash shells will use the script. 3. /bin/sh sources /etc/profile when called from ftp.exe If SHELL isn't exported or is set to /bin/sh, ftp.exe uses the /bin/sh shell for shell escapes. Unfortunately the working directory of the shell is then always set to the user's home directory. Now I know why - for some reason, /bin/sh thinks it's a login shell and sources the profile. This bug seems to be specific to ftp - I haven't seen it with sftp. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/