delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/15/20:41:46

X-Recipient: archive-cygwin AT delorie DOT 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 AT bopp DOT net>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.1: Incomplete install
References: <C742AC34C772EC4BAAF642C22E6079D3012111A34754 AT NSPEXMBX-A DOT the-lab DOT llnl DOT gov> <4B9E94C8 DOT 6020908 AT cygwin DOT com> <C742AC34C772EC4BAAF642C22E6079D3012111A347CE AT NSPEXMBX-A DOT the-lab DOT llnl DOT gov>
In-Reply-To: <C742AC34C772EC4BAAF642C22E6079D3012111A347CE@NSPEXMBX-A.the-lab.llnl.gov>
X-IsSubscribed: yes
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

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

- Raw text -


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