delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/27/03:17:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Andrew Markebo <andrew DOT markebo AT telia DOT com>
Subject: Re: how to source the environment variables from windows within an
existing cygwin window/terminal again?
Date: Thu, 27 Mar 2003 09:16:57 +0100
Lines: 54
Message-ID: <m3isu5441y.fsf@telia.com>
References: <KJEOKFJJEDMIGBEEJCHCCEKMNMAA DOT ralfhauser AT gmx DOT ch>
Mime-Version: 1.0
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux)
Cancel-Lock: sha1:5CsyEyLoYtBMbpDR4lezzzo1D4o=

A better fix for your problem is (I think), is to fire up ssh-agent,
put the output of ssh-agent into a file, and 'source' it into the
shells.

And in your .bashrc or however you start, you check for this file, and
source it if it exists.

And if you want to load the ssh-agent variables in a running bash, you
just either resource your .bashrc or whatever.

There were a discussion about this a while ago I think, some scripts
(bash/bat) added to set the variables, check the mailinglist archive.

     /Andy

/ "Ralf Hauser" <ralfhauser AT gmx DOT ch> wrote:
| Hi,
|
| When I start cygwin by the desktop icon, it inherits the windows variables
| before it executes the ~/.bashrc and sets the environment variables
| specified therein.
|
| If I update/change the windows environment variables (right-click on "My
| Computer" - Properties - Advanced - Environment Variables), how can get
| these new variables into an already existing cygwin window?
|
| Also, it appears that when starting a new cygwin window out of an existing
| one (by running "cygstart /bin/bash"), the new one will not inherit from the
| windows environment in the same way as the first cygwin window did.
|
| I didn't find any hints to this in
| http://cygwin.com/cygwin-ug-net/setup-env.html or
| http://cygwin.com/cygwin-ug-net/using-cygwinenv.html or the
| http://cygwin.com/faq/faq.html nor in this mailing list archive - any other
| places I ought to have looked for it?
|
| Thanks for any hints in advance!
|
| 	Ralf
|
| P.S.: I got into these questions due to ssh-agent:
| i) When running ssh-agent out of cygwin, I also have to start wincvs or
| emacs out of the same cygwin shell (or children of it), otherwise, they will
| not be able to profit from ssh-agent.
| If I use win-ssh-agent.exe (see http://www.ganaware.org/S/win-ssh-askpass),
| the problem is the opposite: I can no longer eval it when starting it, ==>
| the terminal (and its children) from which I started win-ssh-agent.exe
| cannot profit from it. I have to kill it and start a new cygwin window by
| the desktop icon/link or the start-Programs-Menu.
|
|

-- 
 The eye of the beholder rests on the beauty!


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019