delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/27/12:56:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 27 Aug 2004 12:56:16 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Alder <PGDEHMKOKIMD AT spammotel DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Newbie: cygrunsrv using strange PATH variable
In-Reply-To: <cgmmho$7b6$1@sea.gmane.org>
Message-ID: <Pine.GSO.4.61.0408271201460.2567@slinky.cs.nyu.edu>
References: <cgmmho$7b6$1 AT sea DOT gmane DOT org>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Fri, 27 Aug 2004, Alder wrote:

> After removing a previous Cygwin installation from my system and
> reinstalling from the harddrive using Setup, running cygrunsrv from any
> account (administrator or user) produces a Windows dialog reporting that
> the DLL cannot be found in the path:
>
> 	D:\cygwin\usr\sbin;.;<Windows system folders>;.
>
> I'm pretty sure I have my bash startup files in the same state as in my
> previous installation, but here are the relevant bits from these files
> to show how the PATH variable is created:
>
> [/etc/profile]
> PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH:."
>
> [~/.bash_profile]
> PATH="~/bin:${PATH}"
>
> [~/.bashrc]
> <empty>
>
> If I echo the PATH variable when I first log in with rxvt, it shows:
>
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:/cygdrive/c/Program Files/ATI Technologies/ATI Control Panel:/cygdrive/d/Program Files/Common Files/GTK/2.0/bin:.
>
> My question is, then, where is cygrunsrv pulling its PATH information
> from and how do I get it to recognize the environment of the shell its
> run in?

There are two separate problems here.  One is a misconception that the
same PATH you get from your bash startup files will be available to the
services -- that is most certainly not true.  The services executed via
cygrunsrv are invoked directly, with the PATH supposedly inherited from
the Windows system environment.

The second problem, the one I intend to investigate further, is that the
environment doesn't seem to make it through to the subprocesses spawned by
the services (perhaps the solution is as easy as adding "export" to the
CYGWIN variable, but I'll need to experiment).  In other words, on my new
system the default sshd installation didn't work OOTB, and I needed to add
a '-e PATH="/usr/bin:/bin:$PATH"' to the sshd definition.  I'll get back
to the list with the results, whenever I have them.  Not attaching the
cygcheck output because I want to investigate this myself for a bit before
bothering the list with it.

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019