X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <49F80CC5.2010000@bodz.net> Date: Wed, 29 Apr 2009 16:16:05 +0800 From: Lenik User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Cygwin default path, or system-wide environment? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 Here I means when running bash or other shell in non-interactive mode, how can I set up environment variables, and without touch the Win32 System Environment? Default PATH, for example. When PATH variable isn't set, there is a default PATH. But if you set the PATH variable, the default PATH is gone, and then you must add the x:\cygwin\bin to the PATH manually. C:\Profiles\Shecti>path PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\cygwin\bin C:\Profiles\Shecti>bash -c "echo $PATH" /mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/usr/bin C:\Profiles\Shecti>set PATH= C:\Profiles\Shecti>c:\cygwin\bin\bash -c "echo $PATH" /usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:. Well, it seems just fine, but NO, THERE IS A BIG PROBLEM, because not everyone have a clean OS, some of them have already installed a cygwin, but in different versions. I found that cygwin-1.7 is very suitable to deploy, because cygwin-1.7 supports fstab, so you don't have to trick with the Win32 Registry any more, you just config the etc/fstab, different cygwins will have their different mount points and won't bother each other at all. But if I must include a specific version of cygwin\bin in the PATH, then this co-existence is break. -- 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/