Why are some default Windows environment variables not set when logging in via ssh?

Jeffrey J. Kosowsky cygwin@kosowsky.org
Thu Dec 30 18:13:00 GMT 2010


When I run a cygwin bash terminal directly from Windows, I get all the
standard Windows environment variables properly set.

However, when I login in via ssh, some are properly set (e.g.,
$USERPROFILE, $ALLUSERSPROFILE, $HOMEDRIVE) but others are unset (e.g.,
$TEMP, $TMP, $APPDATA, $LOCALAPPDAT, PROGRAMFILES).

- Is this just a weird artifact of the fact that sshd is run by
  cyg_server rather than by the actual user (which perhaps explains why
  the variable $USERNAME is set to cyg_server)?

- Even so, why would PROGRAMFILES not be set right since that is
  presumably not user-dependent?

- Is there any logic behind which variables work and which ones don't?
 
- Is there any way to "fix" this so that the variables are set
  "normally"?
  (I could kluge this by setting them manually in my bashrc but I
   would prefer for them to be set right automatically)

THanks

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



More information about the Cygwin mailing list