This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: startxwin started bash does not read .bashrc or .bash_profile
- From: "Chris J. Breisch" <chris dot ml at breisch dot org>
- To: cygwin at cygwin dot com
- Date: Fri, 01 Mar 2013 11:13:09 -0500
- Subject: Re: startxwin started bash does not read .bashrc or .bash_profile
- References: <15470.1361923720@relay.known.net> <512E489F.8060700@dronecode.org.uk> <6514.1361987973@freon.franz.com> <1977176204.20130227233752@mtu-net.ru> <13227.1361996106@freon.franz.com> <CA+sc5mmn54WHcMp4Ycz7Lw8z9qe6aSvZ6GjU7JNo3fTcCxHg3w@mail.gmail.com> <28423.1362003402@relay.known.net> <CA+sc5mkWtsLWV9ZMpnZZ3xFnRjUnJ_kQp6Di9_3a0F+M+5svZg@mail.gmail.com> <22232.1362061704@relay.known.net> <CA+sc5mmFfRdcByF=w9XBdfx66Yt1+Y9sa30ZTEQc-Hbmh90AuA@mail.gmail.com> <15096.1362152982@freon.franz.com>
On 3/1/2013 10:49 AM, Kevin Layer wrote:
Don't have cron running. I start it as me, the logged in user, from a
mouse click or running "startxwin" in a mintty. Behaves the same
either way.
Well, I am unable to duplicate this no matter what I do. I have even
launched a dash shell directly from cmd.exe and done a startxwin from that.
I do have the following additions at the beginning of my .bashrc and
.bash_profile
.bashrc:
[[ "$-" != *i* ]] && return
export BASHRC=${HOME}/.bashrc
if [ "${BASH_PROFILE-unset}" = "unset" ]; then
source ${HOME}/.bash_profile
fi
.bash_profile:
export BASH_PROFILE=${HOME}/.bash_profile
if [ -f "${HOME}/.bashrc" ] ; then
if [ "${BASHRC-unset}" = "unset" ]; then
source "${HOME}/.bashrc"
fi
fi
That's a little bit of overkill, but it ensures that both my
.bash_profile and .bashrc are sourced if I am in an interactive shell.
For consistency, I should do a check for existence of the .bash_profile
before I source it in the .bashrc, just as I do with the .bashrc in
.bash_profile. But from a purist standpoint that's hardly the only thing
I'm doing wrong here.
I do not have an .xinitrc. I do have an .Xdefaults, but it just has some
xterm display stuff in it.
Chris
--
In theory, there's no difference between theory and practice. In
practice, there is.
--
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