delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/06/18:08:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 6 Aug 2003 18:07:50 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Menon, Girish (MED, WIPRO-GE MED)" <Girish DOT Menon AT med DOT ge DOT com>
cc: cygwin AT cygwin DOT com
Subject: RE: Unable to bring up netscape as any other user
In-Reply-To: <EF3C4DA34DEFD411AE6200A0C9F2A3581AB91D93@uswaumsx06medge.med.ge.com>
Message-ID: <Pine.GSO.4.44.0308061802160.5132-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

BTW, as I mentioned before, cygrunsrv has the -i/--interactive option that
allows you to set this from the command line.

FYI, backtick processing does not happen in the background -- the spawning
shell actually waits for the child to complete.  That said, what are the
exact errors you're getting when you try to execute that script?  Keep in
mind that your environment (in particular, $PATH) may not be the same in
the spawned process and the interactive shell.  Try fully specifying the
paths to any commands ("env" and "grep" in your example).
	Igor

On Wed, 6 Aug 2003, Menon, Girish (MED, WIPRO-GE MED) wrote:

> Never mind the question about setting the registry for "Allowing service
> to interact with desktop"... I found that a dword of 110 will do for the
> inetd registry entry.
>
> But I still had one question though. From the bash shell the ` (back
> ticks) work. But when I spawn a process and execute a shell script which
> contains the back ticks, the process just chokes.
>
> For example, a simple shell script like
> #!/bin/sh
> ..
> ..
> myenv=`env | grep CYGWIN`
> ..
> ..
>
>
> I am able to execute this script properly from the bash shell (as any
> user on the system). But this same script when executed via a spawned
> process does not work. Looks like something is broken in my background
> processing.
>
> Any help?
>
> Girish
>
>
> -----Original Message-----
> From: Menon, Girish (MED, WIPRO-GE MED)
> Sent: Wednesday, August 06, 2003 3:01 PM
> To: 'cygwin AT cygwin DOT com'
> Subject: RE: Unable to bring up netscape as any other user
>
>
> Also, rather than going via command line, is there any other way I can
> do the same setting (i.e. going via services and modifying the
> properties of inetd)? Any arguments to cygrunsrv or inetd or modifying
> the registry...
>
>
> -----Original Message-----
> From: Menon, Girish (MED, WIPRO-GE MED)
> Sent: Wednesday, August 06, 2003 1:06 PM
> To: 'cygwin AT cygwin DOT com'
> Subject: RE: Unable to bring up netscape as any other user
>
>
> Great. It worked.
>
> Now I have a slightly differnt issue. If I try to bring up netscape
> manually from the bash window, it comes up. But if I try to bring it up
> as a background process, it does not work. In my code, I tried to spawn
> a new netscape process, but that failed. When I modified my code to
> instead call netscape directly, it comes up.
>
> Here's a snippet of my code:
>
>
> sprintf(shellExec, "%s/bin/sh.exe", getenv("SYSTEMDRIVE"));
> // spawn new service browser
> _flushall();
> _spawnlp(_P_DETACH, shellExec, shellExec, "netscape.exe", NULL);
>
>
>
>
> -----Original Message-----
> From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu]
> Sent: Wednesday, August 06, 2003 12:01 PM
> To: Menon, Girish (MED, WIPRO-GE MED)
> Cc: cygwin AT cygwin DOT com
> Subject: Re: Unable to bring up netscape as any other user
>
>
> On Wed, 6 Aug 2003, Menon, Girish (MED, WIPRO-GE MED) wrote:
>
> > Up until recently, I was using an older version of cygwin (1.3.10).
> With
> > the advent of the security patch for telnet, inetutils 1.3.23, I
> decided
> > to upgrade my cygwin version to the latest (1.3.22) with the inetutils
> > 1.3.23.
> >
> > Ever since, I have been having some problems. I installed cygwin as
> > Administrator. If I become some other user and try to bring up
> netscape
> > (which was also installed as Administrator), netscape does not come
> up.
> >
> > If I do a ps, I see the netscape task is running, but I am not able to
> > see the browser.
> >
> > I am attaching the cygcheck output. Any suggestions on where I am
> going
> > wrong.
>
> The netscape process would come up as a child process of the inetd
> service.  Therefore, the service should have interaction with desktop
> enabled for you to see the netscape window.  I've added an option for
> that
> to cygrunsrv, but inetd might not have one, so you'll have to go into
> the
> services panel and edit the properties of the inetd service to enable
> that.  Just check the "Allow service to interact with desktop" checkbox.
> Hope this helps,
>         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!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


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