This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: startxwin started bash does not read .bashrc or .bash_profile


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]