www.delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <46D2C8DF.6060603@cygwin.com> |
Date: | Mon, 27 Aug 2007 08:51:43 -0400 |
From: | "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070505 Remi/2.0.0.0-3.fc4.remi Thunderbird/2.0.0.0 Mnenhy/0.7.5.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Using cygwin bash shell with NT Emacs, path is not setup perfectly |
References: | <fapb84$s4n$1 AT sea DOT gmane DOT org> <faqhiu$o9b$2 AT sea DOT gmane DOT org> <46D1AA07 DOT 5090307 AT math DOT cornell DOT edu> <fasahl$g02$1 AT sea DOT gmane DOT org> |
In-Reply-To: | <fasahl$g02$1@sea.gmane.org> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Eric Lilja wrote: > Ken Brown wrote: >> On 8/25/2007 8:30 PM, Eric Lilja wrote: >>> Ok, it seems that /etc/profile is not read when I start cygwin bash >>> using M-x shell and I think that may be a problem. >> >> I can't find the earlier message(s) in this thread, so I'm not sure of >> the context. But you might be able to solve your problem by >> customizing the emacs variable explicit-bash-args to include "-l" or >> "--login". >> >> Ken >> >> > > Thanks, but unfortunately it didn't help. I read and post using gmane > (set up as a news server under thunderbird) and it took hours before my > post showed up and it sounds like people didn't get see it even then. > > Here's the original post: > > Hello, I'm using a native win32 version emacs and I want M-x shell to > invoke Cygwin's bash instead of the default shell. Everything seems to > work except that the path does not get setup properly. > > Here's the output from echo $PATH when bash is run under nt emacs: > $ echo $PATH > /usr/bin:/usr/local/bin:/usr/bin:/usr/bin:/usr/X11R6/bin:/cygdrive/c/Program/MiKTeX > 2.6/miktex/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/emacs/bin > > > Here's the same command when started using cygwin.bat: > $ echo $PATH > /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Program/MiKTeX > 2.6/miktex/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/emacs/bin > > > See the difference? Under ntemacs I get /usr/bin twice in a row instead > of /usr/bin:/bin: > > This is causing problems for me. Why is this happening and how can I > solve it? > > Here's the relevant section of my .emacs. It's basically what's on the > emacs wiki (I added ansi-color.for-comint-mode-on and removed the > setting of the HOME variable as that is availabe anyway on my system): > (let* ((cygwin-root "c:/cygwin") > (cygwin-bin (concat cygwin-root "/bin"))) > You could always try setting "cygwin-root" to "/usr/bin". They are the same directory under Cygwin. Using "-l" with bash will get you a login shell. If you're not seeing paths as you expect them, you should look at possible locations where the path could be set incorrectly. '/etc/profile' is the typical location for setting the path for all users but you can override this in any of your rc files. Look at the resolution logic documented in '/etc/profile' for determining your home directory. This could be set differently for the two environments. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |