startxwin started bash does not read .bashrc or .bash_profile

Chris J. Breisch
Fri Mar 1 16:13:00 GMT 2013

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 


[[ "$-" != *i* ]] && return
export BASHRC=${HOME}/.bashrc
if [ "${BASH_PROFILE-unset}" = "unset" ]; then
     source ${HOME}/.bash_profile

export BASH_PROFILE=${HOME}/.bash_profile
if [ -f "${HOME}/.bashrc" ] ; then
   if [ "${BASHRC-unset}" = "unset" ]; then
     source "${HOME}/.bashrc"

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.


In theory, there's no difference between theory and practice. In 
practice, there is.

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list