This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: How to run bash in rxvt with both login shell and in a specific directory?
On 2009-09-09, KARR, DAVID (ATTCINW) wrote:
> I'd like to have a command line that will run bash inside rxvt, both as
> a login shell (so I get all my paths and profile) and in a specific
> directory. I know how to get it to a specific directory, and I know how
> to make it a login shell, but I can't figure out how to get both.
>
> If I use this:
>
> C:\cygwin\bin\rxvt.exe -ls -cd "path" -e /usr/bin/bash -l
>
> I get a login shell, but at my home dir, not at the specified path.
>
> If I remove the last "-l", it goes to the correct directory, but it
> didn't appear to load my profile (PATH isn't correct, for instance).
This seems to work for me, from the Windows Command Prompt:
C:\cygwin\bin\rxvt.exe -e /bin/bash --login -c "cd /usr/local/src; exec bash -i"
I just used the /usr/local/src path as a convenient example.
HTH,
Gary
--
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