X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org X-Authority-Analysis: v=1.0 c=1 a=bp7pUXD8XzQA:10 a=hOpmn2quAAAA:8 a=9I5xiGouAAAA:8 a=-5GrvbEH7yKZI4rLX0MA:9 a=K0lUUbjksvu2zgq2yDYA:7 a=cd48trkqrHBqjgdu1W492ZQO9BAA:4 a=Kn_jH5U_fZ8A:10 a=xZSDXGblts0A:10 a=hUswqBWy9Q8A:10 Message-ID: <4B81F51C.4090205@charter.net> Date: Sun, 21 Feb 2010 22:08:12 -0500 From: SJ Wright User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Batch file code to launch rxvt pointed elsewhere than $HOME -- what's wrong with my code? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Sorry that question went out from the wrong email box. I must have subscribed before on sjwright68u AT charter DOT net 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 ' 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 > batch script: > > set HOME=C:\blu\newest > > 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. http://old.nabble.com/How-to-run-bash-in-rxvt-with-both-login-shell-and-in-a-specific-directory--td25369374.html 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 cd "$STARTDIR" fi 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. Cheers. SJ Wright -- 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