X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4B9EE1C6.8070005@bopp.net>
Date: Mon, 15 Mar 2010 20:41:26 -0500
From: Jeremy Bopp <jeremy@bopp.net>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: 1.7.1:  Incomplete install
References: <C742AC34C772EC4BAAF642C22E6079D3012111A34754@NSPEXMBX-A.the-lab.llnl.gov>  <4B9E94C8.6020908@cygwin.com> <C742AC34C772EC4BAAF642C22E6079D3012111A347CE@NSPEXMBX-A.the-lab.llnl.gov>
In-Reply-To: <C742AC34C772EC4BAAF642C22E6079D3012111A347CE@NSPEXMBX-A.the-lab.llnl.gov>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Roe, Kevin L. wrote:
> So a complete uninstall (by deleting the directory and removing registry references) followed by a complete install fixed all my problems except one:
> 
> My rxvt shortcut results in a prompt that has not read my .bashrc file.  So I hacked the /etc/profile file to include the line:
> 
> . "/<home_dir>/.bashrc"
> 
> That fixed it.

And it broke automatically updating /etc/profile for the future.  Rather
than editing your /etc/profile file, create a .bash_profile file in your
home directory with the following contents:

[[ -f ~/.bashrc ]] && . ~/.bashrc

Then read the bash manpage regarding startup files.  What you want is at
the beginning of the INVOCATION section.  The following excerpt provides
the details for --login:

	When bash is invoked as an interactive login shell, or as a
non-interactive  shell with the --login option, it first reads and
executes commands from the file /etc/profile, if that file exists.
After reading that file, it looks for ~/.bash_profile, ~/.bash_login,
and ~/.profile, in that order, and reads and executes commands from the
first one  that exists  and  is  readable.  The --noprofile option may
be used when the shell is started to inhibit this behavior.

> The rxvt syntax is below:
> 
> C:\cygwin\bin\rxvt.exe  -T "%COMPUTERNAME%.%USERDNSDOMAIN%" -e /bin/bash --login -c "exec /bin/bash"

This can be simplified as follows (all one line):

C:\cygwin\bin\rxvt.exe  -T "%COMPUTERNAME%.%USERDNSDOMAIN%" -e /bin/bash
--login

Telling rxvt to execute /bin/bash --login (using the -e option) will
start your bash shell.  There is no need to tell that bash shell to
simply exec another one by use of the -c option to bash.  It doesn't
break anything to do it your way, but it's unnecessary.

-Jeremy

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

