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]

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


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


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