This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PROGRAMFILES variable is not set during openssh session


Le 12/02/2012 17:33, ArcFi a Ãcrit :
PROGRAMFILES variable is not set during openssh session.
This is very important for remote administrative tasks.

admin@srv06 ~
$ echo $COMPUTERNAME,$PROGRAMFILES,$USERPROFILE,$SYSTEMDRIVE
SRV06,C:\Program Files,C:\Documents and Settings\admin,C:

admin@srv06 ~
$ ssh localhost 'echo $COMPUTERNAME,$PROGRAMFILES,$USERPROFILE,
$SYSTEMDRIVE'
admin@localhost's password:
SRV06,,,C:


around february 19 2011, there was a discussion about to limit ssh environment variables not including some windows ones !


since then, I use the attached script in /etc/profile.d to set the missing ones at connection time...

you may comment the lines containing SECONDS.

it's based on Kurt Franke's similar script in the idea.

PS : Corinna, maybe this may be made a FAQ ?

Cyrille Lefevre
--
mailto:Cyrille.Lefevre-lists@laposte.net

Attachment: ssh-session-env.sh
Description: application/shellscript

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]