This is the mail archive of the
mailing list for the Cygwin project.
Re: run.exe fails to run my application
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: george young <gry at ll dot mit dot edu>
- Cc: cygwin at cygwin dot com
- Date: Mon, 27 Dec 2004 12:58:02 -0500 (EST)
- Subject: Re: run.exe fails to run my application
- References: <firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
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
> 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
> 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
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.
|\ _,,,---,,_ email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ firstname.lastname@example.org
|,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