How to run bash in rxvt with both login shell and in a specific directory?

KARR, DAVID (ATTCINW) dk068x@att.com
Wed Sep 9 20:21:00 GMT 2009


> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On
> 
> On Wed, Sep 9, 2009 at 1:31 PM, Gary Johnson wrote:
> >    C:\cygwin\bin\rxvt.exe -e /bin/bash --login -c "cd /usr/local/src;
> exec bash -i"
> 
> A good solution, but it won't work if you do anything in .bash_profile
> that's not inherited by child shell processes (aliases, shell
> functions, etc), since .bash_profile won't be executed by the bash -i.
> 
> Of course, it's not good practice to do such things in .bash_profile;
> better to put them in .bashrc (and have .bash_profile source .bashrc
> so they happen in login shells, too)... but something to watch out
> for.

Hmm.  This (Gary's solution) didn't work.  Instead of leaving me in my Cygwin home or the target directory, it left me in my Windows home.  I don't know why.

I tried implementing Mark's solution, and that worked fine.  I don't have to look at it, so I won't complain. :)



More information about the Cygwin mailing list