Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: Mon, 27 Dec 2004 12:58:02 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: george young cc: cygwin AT cygwin DOT com Subject: Re: run.exe fails to run my application In-Reply-To: <20041227115638.14ddbba7.gry@ll.mit.edu> Message-ID: References: <20041227115638 DOT 14ddbba7 DOT gry AT ll DOT mit DOT edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 27 Dec 2004, george young wrote: > [cygwin X-startup-scripts-1.0.10-2] > > I can not get run.exe to run my application. The app runs ok directly > from the DOS prompt(with the annoying dos box). It runs from the cygwin > prompt. But put 'run' in front of the command and I get an error dialog > popup: > > Run.exe > Error: could not start E:\cygwin\usr\local\bin\xapp.py > > "Run" fails the same invoked from either the cygwin or dos prompt. > > Run works fine with xterm. > > The app's directory is in the system path. Same failure happens > whether invoked with full path or just the app name. (assoc and ftype > have been twiddled to get the python script xapp.py run by > /usr/bin/python2.4) > > When I do "run xapp.py" the error message contains the full pathname, > so it is *finding* the executable. The error message is different if > I give it a non-existant file name. > > What could cause this? How can I debug this problem? > > Does run keep a cache of executable names/paths somewhere that I might > need to flush? Well, Fred Kulack's post pretty much answers the "how", so let me get to the "why" ("doesn't it work"). run.exe uses the Windows mechanisms to run the given program, so it doesn't understand Cygwin's shebang (#!) line. You need to get a shell to interpret it. If you want to replicate the same environment as you get when you open a regular bash window, use Fred's "run /bin/bash --login -c /usr/local/bin/xapp.py"; otherwise a simple "run /bin/sh -c /usr/local/bin/xapp.py" would suffice. Don't forget to set the DISPLAY, too, if the "x" in "xapp.py" means what I think it means. If you want to go through the file association instead, use "cygstart" (in the "cygutils" package), i.e., "cygstart /usr/local/bin/xapp.py" -- but there's no way to set DISPLAY with this method. 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! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- 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/