delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/07/26/04:43:06

X-Spam-Check-By: sourceware.org
Message-ID: <46A85E7C.40708@bonhard.uklinux.net>
Date: Thu, 26 Jul 2007 09:42:36 +0100
From: fergus <fergus AT bonhard DOT uklinux DOT net>
User-Agent: Thunderbird 2.0.0.5 (Windows/20070716)
MIME-Version: 1.0
To: Cygwin ML <cygwin AT cygwin DOT com>
CC: fergus <fergus AT bonhard DOT uklinux DOT net>
Subject: Where, or how, is BASH set?
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Sorry, a very individual query:
I have two portable Cygwins, one on a stick, one on a mobile drive. They 
are both up-to-date though only the one on the drive is a Full 
installation. In all other respects they are not obviously different 
(mounting -buf at the start, un-mounting at the end, etc) and each is 
started in a bash shell. They have identical /etc/group and /etc/passwd. 
After starting the one on the drive, a selection from the output of set 
gives
	BASH=/usr/bin/bash
	HOME=/home/user
	SHELL=/bin/bash
while the one on the stick has
	BASH=/bin/bash
	HOME=/home/user
	SHELL=/bin/bash
I do not understand how this difference (in the definition of BASH) 
arises though I can see it shouldn't matter. It's the only difference in 
the entire output from set on the two devices.
On the drive I can type rxvt <Enter> and immediately get into a rxvt 
shell with $HOME/.bashrc read. This is odd (I would have expected to 
have to type rxvt -e bash <Enter>) but convenient because of the reduced 
typing. On the stick I actually do have to type rxvt -e bash <Enter>; 
the reduced form rxvt <Enter> does not read $HOME/.bashrc and I end up 
in a rxvt terminal with
	BASH=/usr/bin/sh
This, conversely, is expected (but, in comparison, inconvenient).
Regardless of expectedness/ unexpectedness/ convenience, I would really 
like to understand the reason for the difference in behaviours. But I 
really do not want to bother you with loads of individualised corollary 
information (and last time I did I somehow sent it en clair to people's 
mailboxes and got admonished by somebody or other in the good ol' 
imperial manner) ... it would be good if an expert could explain the 
strange difference in the initial setting of BASH; or tell me where or 
how BASH is set so that I could try to explore the difference myself; 
and offer some kind of expert conjecture on whether the difference in 
the setting of BASH could be relevant to the different consequences of 
typing rxvt <no arguments> <Enter> at the bash prompt on the two devices.
Thank you.
Fergus


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019