delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/24/14:28: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://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
Date: Wed, 24 Aug 2005 14:27:58 -0400 (EDT)
From: Jason Pyeron <jpyeron AT pdinc DOT us>
X-X-Sender: jpyeron AT ns DOT pyerotechnics DOT com
To: cygwin AT cygwin DOT com
Subject: Re: System environment variables
In-Reply-To: <20050824174417.GG17452@calimero.vinschen.de>
Message-ID: <Pine.LNX.4.62.0508241420530.26825@ns.pyerotechnics.com>
References: <Pine DOT LNX DOT 4 DOT 62 DOT 0508241300580 DOT 26825 AT ns DOT pyerotechnics DOT com> <20050824174417 DOT GG17452 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
X-IsSubscribed: yes

On Wed, 24 Aug 2005, Corinna Vinschen wrote:

> On Aug 24 13:08, Jason Pyeron wrote:
>>
>>
>> How can I get the ssh service to inherit the environment variables as set
>> in the system properties control panel applet?
>
> You can't.  Use one of the methods to propagate environment variables

thats what I thought.

can I get some comments and critiques on my solution below:


/etc/profile.d/winvars.sh


#! /bin/sh

cd /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session\ Manager/Environment/

for i in * ; do

  bash -c "set -u ; echo \$$i" 2&> /dev/null || export $i="`cat $i`"

done



-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Partner & Sr. Manager             7 West 24th Street #100     -
- +1 (443) 921-0381                 Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.

--
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/

- Raw text -


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