This is the mail archive of the cygwin@cygwin.com 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: Bash PATH via ssh


On Wed, Jan 08, 2003 at 02:54:21PM -0500, Pierre A. Humblet wrote:
> On Wed, Jan 08, 2003 at 02:02:06PM -0600, Michael Hipp wrote:
> > Thanks. I now have ensured that ~/.profile, ~./bash_profile, ~/.bash_login,
> > /etc/profile all contain the lines:
> > 
> > PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
> > export PATH
> > 
> > But still when I do ssh 192.168.0.150 'echo $PATH' it returns only the
> > windows path items. What am I missing here?
> > 
> > Any help appreciated.
> 
> The Cygwin sshd passes the PATH that exists in the system environment.
> Edit it by right clicking My Computer, etc..

Uhm... in theory, there should be at least "/bin" somewhere in $PATH.
The reason is that `cygrunsrv' appends ":/bin" to $PATH prior to
calling the service application (sshd) to assure that cygwin1.dll is
found in $PATH.

Other than that you can use the ability of cygrunsrv to set environment 
variables also to set $PATH:

  cygrunsrv -I sshd  ...  -e "PATH=/cygdrive/c/WINDOWS:..."

Just don't forget to add all Windows system paths, too.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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