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: Andy Koppe <andy dot koppe at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 21 Feb 2010 21:04:49 +0000
- Subject: Re: Batch file code to launch rxvt pointed elsewhere than $HOME -- what's wrong with my code?
- References: <4B81999C.email@example.com>
> I'm trying to write batch scripts of the kind that start a Cygwin session in
> rxvt from the desktop, with the added feature that the session starts in a
> folder other than $HOME. I want to do this for two folders I use often.
> I know urxvt has a -cd command, and thought rxvt in Cygwin did too. I tried
> this code
>> @echo off
>> chdir C:\cygwin\bin
>> start rxvt -display :0 -sl 2500 -sr -tn rxvt-cygwin-native -geometry 80x25
>> -font "Bitstream Vera Sans Mono-14" -e /bin/bash --login -i -cd
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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple