This is the mail archive of the
mailing list for the Cygwin project.
Re: logging in via telnet: no user environment variables; cscript can't be executed
- From: "Bernd Strobel" <bsmaillists at gmx dot de>
- To: "Andreas Wicker" <Andreas dot Wicker at ids dot de>
- Cc: <cygwin at cygwin dot com>
- Date: Sat, 10 Aug 2002 16:03:56 +0200
- Subject: Re: logging in via telnet: no user environment variables; cscript can't be executed
- References: <firstname.lastname@example.org>
----- Original Message -----
From: "Andreas Wicker" <Andreas.Wicker@ids.de>
Sent: Tuesday, August 06, 2002 2:44 PM
Subject: Bug: logging in via telnet: no user environment variables; cscript
can't be executed
> When I log into a computer via cygwin telnet, I do get the system
> environment variables.
> But I do not get the user environment variables.
I use ssh but it's the same with that.
> I'd propose to build it into cygwin that you get the user user variables
> when being logged in via telnet.
> A workaround that I've used for this consisted of a VisualBasic-Script,
> was called in the /etc/profile and that copied the
> user-environment-variables to
> a little file which then was sourced from the /etc/profile.
I found this problem interesting and since I started using cygwin extensivly
recently, I assume I will run over this problem soon.
I tried this in my /etc/profile:
for a in $USERENV/*; do
value="`sed -e 's/%\(.*\)%/\$\1/' <$a`"
eval export $name=\"$value\"
the sed command replaces %VARNAME% with $VARNAME. But this will only work
for the first environment variable in the value. So this probably can be
much improved, but solves the issue for TMP and TEMP. What - an the other
hand - is not needed, because the space in the pathname for these variables
will probably break some shell scripts, so I've put the following lines
after the above code
But there may be other variables which refer to %USERNAME% or %USERPROFILE%.
> This worked well with the cygwin1.dll 1.3.5, but does not work anymore
> 1.3.12. The Visual-Basic-Interpreter cscript.exe that reads the user
> can not be executed when logged in via telnet with cygwin1.dll 1.3.12.
Ok, I don't know any solution for this. I can only say, that it's exactly
the same bug with ssh. But maybe you don't need csript anymore if you try my
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html