This is the mail archive of the
mailing list for the Cygwin project.
Re: Batch file code to launch rxvt pointed elsewhere than $HOME -- what's wrong with my code?
- From: SJ Wright <sjwright68 at charter dot net>
- To: cygwin at cygwin dot com
- Date: Sun, 21 Feb 2010 22:08:12 -0500
- Subject: Re: Batch file code to launch rxvt pointed elsewhere than $HOME -- what's wrong with my code?
Sorry that question went out from the wrong email box. I must have
subscribed before on email@example.com or I wouldn't have caught
Andy Koppe's reply on nabble:
You've got the -cd in the wrong place. Everything after the -e is
taken as the command to execute, i.e. you're passing the -cd to bash
rather than *rxvt*. Bash doesn't recognise it and therefore exits
immediately with an error.
But even if you put the '-cd <path>' before the -e it won't work as
you expect because the default /etc/profile contains a 'cd $HOME'
command. Instead of using -cd, though, you could set HOME in your
Or you could change your home directory in /etc/passwd.
It was also on nabble that I found the thread I mentioned briefly in the
mis-sent email that included my original question.
Mark J. Reed and Gary Johnson were replying to a member named David Karr
with suggestions and advice that included the following code that seems
to work in the Command Prompt
C:\cygwin\bin\rxvt.exe -cd "/cygdrive/c/blu/newest" -e /usr/bin/bash
-c "STARTDIR=\"$PWD\" exec /bin/bash --login"
This after following Mark's suggestion that this conditional
if [ -n "$STARTDIR" ]; then
be added to one's .bashrc file. The next step will be testing the same
line, including in it the ostensibly cosmetic customization string from
my original rxvt.bat. Namely '-geometry 80x25 -font "Bitstream Vera
Sans Mono-14" '
If that works, then all I should need to add is the conventional @echo
off opener and I'm good to go.
Thanks to Andy for pointing me in the right direction. And if they're
still on the list, thanks also to Mark & Gary.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple