Re: Running a shell Script Directly from windows

2004-07-08 Thread Fred Kulack
I have had the best luck using the 'run' utility to avoid extra
consoles and other 'shtuff' like that.
Haven't seen any doc about it though so it may disappear.
Dunno the details.

For example, I create a shortcut for running X so that I don't 
get the extra console window where bash ran...

That shortcut runs this:
C:\cygwin\usr\X11R6\bin\run.exe bash --login -c startx

Clearly your path needs to be setup correctly.


The stuff we call software is not like anything that human society 
  is used to thinking about. Software is something like a machine, and 
  something like mathematics, and something like language, and 
  something like thought, and art, and information... 
  but software is not in fact any of those other things.
Bruce Sterling - The Hacker Crackdown

Fred A. Kulack - IBM eServer iSeries - Enterprise Application Solutions
ERP, Java DB2 access, Jdbc, JTA, etc...
IBM in Rochester, MN  (Phone: 507.253.5982   T/L 553-5982)
mailto:kulack/us.ibm.com   Personal: mailto:kulack/magnaspeed.net
AIM Home:FKulack  AIM Work:FKulackWrk 
MSN Work: fakulack/hotmail.com (replace email / with @)

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



Running a shell Script Directly from windows

2004-07-07 Thread Scott Emerson Longley
I am wondering if Cygwin provides a way to run shell scripts or other
programs that run within Cygwin, directly from windows (or a .bat). In
other words, I would like to double-click something on my desktop and have
it run the shell script. I have fooled a little with bash command-line
options and whatnot, but to no avail. Any insight or URL's that lead to an
answer would be greatly appreciated.

-Scott Longley

P.S. Please cc any responses to me, as I am not subscribed to the list.



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



Re: Running a shell Script Directly from windows

2004-07-07 Thread Brian Dessent
Scott Emerson Longley wrote:

 I am wondering if Cygwin provides a way to run shell scripts or other
 programs that run within Cygwin, directly from windows (or a .bat). In
 other words, I would like to double-click something on my desktop and have
 it run the shell script. I have fooled a little with bash command-line
 options and whatnot, but to no avail. Any insight or URL's that lead to an
 answer would be greatly appreciated.

Create a shortcut that runs sh.exe /path/to/script.sh.  When you click
on it your script will run in a command window.  If your cygwin bin
directory is not in your path then the shortcut will have to include it,
i.e. c:\cygwin\bin\sh.exe /home/foo/bar.sh.  The executable's location
is a Windows path, the args to it are POSIX paths.  If the script has
something other than /bin/sh in the shebang, then substitute
appropriately.

Brian

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



Re: Running a shell Script Directly from windows

2004-07-07 Thread Krzysztof Duleba
Brian Dessent wrote:


  I am wondering if Cygwin provides a way to run shell scripts or other
  programs that run within Cygwin, directly from windows (or a .bat). In
  other words, I would like to double-click something on my desktop and
have
  it run the shell script. .

 Create a shortcut that runs sh.exe /path/to/script.sh.  When you click
 on it your script will run in a command window.  If your cygwin bin
 directory is not in your path then the shortcut will have to include it,
 i.e. c:\cygwin\bin\sh.exe /home/foo/bar.sh.

I guess that the following solution is better, as no additional files
except for the script itself are used.

Right-click script.sh, select open with, choose a program (or whatever
the name for the option is), then go to your Cygwin directory, select
bash.exe, mark always ... and then click ok. Since then, everytime you
double-click the script, it will be launched.

Regards
Krzysztof Duleba



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