startxwin started bash does not read .bashrc or .bash_profile

Kevin Layer layer@known.net
Wed Feb 27 03:21:00 GMT 2013


Arthur Tu wrote:

>> On 2/27/2013 8:08 AM, Kevin Layer wrote:
>> > If I put this into .startxwinrc:
>> >
>> >    mintty /usr/bin/bash.exe --login -i
>> >
>> > the resulting shell does not read .bash_profile.  If I put
>> >
>> >    mintty /usr/bin/bash.exe -i
>> >
>> > it doesn't read .bashrc.
>> >
>> >
>> > I've been beating my head against this wall for hours, over a few
>> > days.  I've googled my ass off, but I can't find anyone that's having
>> > the same problem.
>> >
>> >
>> > My ultimate goal is to use ssh-agent/ssh-add to make life easier, but
>> > it requires my .bashrc to be sourced (.bash_profile merely sources
>> > .bashrc).
>> >
>> >
>> > Thanks.
>> >
>> >
>> ## .bash_profile
>> if [ -f "${HOME}/.bashrc" ] ; then
>>   source "${HOME}/.bashrc"
>> fi
>> 
>> What do you mean? Isn't this enough?

It is not.  As I said, without --login, when .bashrc would be loaded
directly... it is *not*.

This should be pretty easy for someone to test.  Does it work for
anyone else, as I've described?

I'm up to date on my installation as of today.

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



More information about the Cygwin mailing list