public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How to run cygwin on boot
@ 2012-04-05  7:42 J.V.
  2012-04-05  7:58 ` marco atzeri
  0 siblings, 1 reply; 4+ messages in thread
From: J.V. @ 2012-04-05  7:42 UTC (permalink / raw)
  To: cygwin

I need to run a .bat file on startup that will launch a cygwin bash script.

I can put the .bat file in the folder "startup" to connect some network 
drives and then I want to launch a bash script.

Can this be done?

thanks

J.V.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to run cygwin on boot
  2012-04-05  7:42 How to run cygwin on boot J.V.
@ 2012-04-05  7:58 ` marco atzeri
  2012-04-05 19:24   ` Gary Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: marco atzeri @ 2012-04-05  7:58 UTC (permalink / raw)
  To: cygwin

On 4/5/2012 9:41 AM, J.V. wrote:
> I need to run a .bat file on startup that will launch a cygwin bash script.
>
> I can put the .bat file in the folder "startup" to connect some network
> drives and then I want to launch a bash script.
>
> Can this be done?
>
> thanks
>
> J.V.
>

yes.
make a copy of cygwin.bat that is in the the cygwin root
and use

   bash -c "your script"

instead of

   bash --login -i

regards
Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to run cygwin on boot
  2012-04-05  7:58 ` marco atzeri
@ 2012-04-05 19:24   ` Gary Johnson
  2012-04-06  1:05     ` Andrey Repin
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Johnson @ 2012-04-05 19:24 UTC (permalink / raw)
  To: cygwin

On 2012-04-05, marco atzeri wrote:
> On 4/5/2012 9:41 AM, J.V. wrote:
> >I need to run a .bat file on startup that will launch a cygwin bash script.
> >
> >I can put the .bat file in the folder "startup" to connect some network
> >drives and then I want to launch a bash script.
> >
> >Can this be done?
> >
> >thanks
> >
> >J.V.
> >
> 
> yes.
> make a copy of cygwin.bat that is in the the cygwin root
> and use
> 
>   bash -c "your script"
> 
> instead of
> 
>   bash --login -i

You may want to keep the "--login" option, e.g.,

    bash --login -c "your script"

Otherwise you will not get important parts of the Cygwin environment
such as PATH.

Regards,
Gary


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to run cygwin on boot
  2012-04-05 19:24   ` Gary Johnson
@ 2012-04-06  1:05     ` Andrey Repin
  0 siblings, 0 replies; 4+ messages in thread
From: Andrey Repin @ 2012-04-06  1:05 UTC (permalink / raw)
  To: Gary Johnson, cygwin

Greetings, Gary Johnson!

> You may want to keep the "--login" option, e.g.,

>     bash --login -c "your script"

> Otherwise you will not get important parts of the Cygwin environment
> such as PATH.

And get a long hiccup in exchange.
With --login it takes a long while for bash to start up.
Better make necessary adjustments in your default environment to make basic
cygwin stuff work without a second poke.


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 06.04.2012, <04:55>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-06  1:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-05  7:42 How to run cygwin on boot J.V.
2012-04-05  7:58 ` marco atzeri
2012-04-05 19:24   ` Gary Johnson
2012-04-06  1:05     ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).