This is the mail archive of the cygwin 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: run.exe fails to run my application

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\
> "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 run by
> /usr/bin/python2.4)
> When I do "run" 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/"; otherwise a
simple "run /bin/sh -c /usr/local/bin/" would suffice.  Don't
forget to set the DISPLAY, too, if the "x" in "" 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/" -- but
there's no way to set DISPLAY with this method.
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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:
Problem reports:

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