-----Original Message-----
From: ssh-l-owner@erdelynet.com [mailto:ssh-l-owner@erdelynet.com]
Sent: Tuesday, September 18, 2001 11:12 PM
To: szummer@media.mit.edu
Hi!
I noticed that the cygwin openssh implementation does not preserve
Windows *user* environment variables upon ssh login for that user.
However, it does preserve the Windows *system* environment variables.
I resorted to manually adding the *user* environment variables to
~/.ssh/environment, but I was wondering if there is a better way.
An easy way to get the user environment variables, is to use the
Cygwin regtool as below. However, you still need to manually edit the
result, as the registry stores the environment variables unexpanded
(with %, %) and the $PATH variable needs special treatment, because it
can occur both as a system variable and user variable.
I am curious if there are any better ways - I had hoped this was
'built-in' behavior of ssh.
-- Martin
########################################################
#!/bin/sh
vars=`regtool list HKEY_CURRENT_USER\\\\Environment`
for v in $vars
do
key=`regtool get HKEY_CURRENT_USER\\\\Environment\\\\$v`
echo "$v=$key"
done
###################################################
-- List Information: http://tech.erdelynet.com/maillist-ssh-l.asp List Archives: http://erdelynet.com/archive/ssh-l/Received on Tue Sep 18 23:15:11 2001
This archive was generated by hypermail 2.1.8 : Fri Jul 29 2005 - 17:33:30 EDT