From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3916 invoked by alias); 9 Sep 2009 17:31:37 -0000 Received: (qmail 3870 invoked by uid 22791); 9 Sep 2009 17:31:33 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.spocom.com (HELO mail.spocom.com) (206.63.224.230) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Sep 2009 17:31:29 +0000 Received: from spkdsl-116-107.cet.com [206.63.116.107] by mail.spocom.com with SMTP; Wed, 9 Sep 2009 10:30:50 -0700 Date: Wed, 09 Sep 2009 17:31:00 -0000 From: Gary Johnson To: cygwin@cygwin.com Subject: Re: How to run bash in rxvt with both login shell and in a specific directory? Message-ID: <20090909173059.GA5804@KCJs-Computer> Mail-Followup-To: cygwin@cygwin.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-09/txt/msg00211.txt.bz2 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