public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Windows 7 64 Bit flashes DOSBox visible on Desktop when using run-1.3.0 or run2-0.4.2 to start Cygwin commands
@ 2014-01-28  9:37 dyle
  2014-01-28 11:15 ` Marco Atzeri
  0 siblings, 1 reply; 3+ messages in thread
From: dyle @ 2014-01-28  9:37 UTC (permalink / raw)
  To: cygwin

Hi *,

[this is my 2nd email ... got myself some mailing-list registration
problems as well ... sorry for the noise]

I try to start cygwin commands without a DOS-Box as suggested by run and
run2. To no avail. I see the CMD-Window (DOS-Box) flashing up (and down
again). I tried cygwin and cygwin64 on a Windows 7 64Bit machine.

The command does complete successful (e.g. just a "#!/bin/sh <CR> ls -1 |
wc -l > count_file.txt") but I cannot help perceiving the opening and
immediate closing of the DOSBox window. Running a series of such commands
in a loop would render my Windows desktop into a stroboscope.

Also I looked up the cygwin (and winsup) sources but was not lucky to find
any code or run or run2. And there's no reference whatsoever in
/usr/share/doc/run and /usr/share/doc/run2 on where to *obtain* the sources
for these packages. They do not seem to be included in the regular cygwin
CVS.

I do not know what I'm doing wrong, since Google tells me it should work
without popping up a DOS-Box window.

Could anyone please post me some advice (or tell me where to obtain the
sources)?


Thx,
Oliver

--
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] 3+ messages in thread

* Re: Windows 7 64 Bit flashes DOSBox visible on Desktop when using run-1.3.0 or run2-0.4.2 to start Cygwin commands
  2014-01-28  9:37 Windows 7 64 Bit flashes DOSBox visible on Desktop when using run-1.3.0 or run2-0.4.2 to start Cygwin commands dyle
@ 2014-01-28 11:15 ` Marco Atzeri
  2014-01-28 13:13   ` dyle
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Atzeri @ 2014-01-28 11:15 UTC (permalink / raw)
  To: cygwin

On 28/01/2014 10:37, dyle wrote:
> Hi *,
>
> [this is my 2nd email ... got myself some mailing-list registration
> problems as well ... sorry for the noise]
>
> I try to start cygwin commands without a DOS-Box as suggested by run and
> run2. To no avail. I see the CMD-Window (DOS-Box) flashing up (and down
> again). I tried cygwin and cygwin64 on a Windows 7 64Bit machine.
>
> The command does complete successful (e.g. just a "#!/bin/sh <CR> ls -1 |
> wc -l > count_file.txt") but I cannot help perceiving the opening and
> immediate closing of the DOSBox window. Running a series of such commands
> in a loop would render my Windows desktop into a stroboscope.

if you need to run a series of command, why don't you use
the mintty terminal ?
I do not understand what are you trying to achieve with run,
it seems the wrong tool for your example.

If you want to put a stop just before closing the scripts,
just add a read
"#!/bin/sh <CR> ls -1 | > wc -l > count_file.txt <CR> read"

and it will wait a "Return" before completing the script and
closing the window.

> Also I looked up the cygwin (and winsup) sources but was not lucky to find
> any code or run or run2. And there's no reference whatsoever in
> /usr/share/doc/run and /usr/share/doc/run2 on where to *obtain* the sources
> for these packages. They do not seem to be included in the regular cygwin
> CVS.

use setup do download the source package.
All sources are available on "Select Packages" window,
forth column is called "Scr ?"

Check the box, it will be deployed in "/usr/src"

>
> I do not know what I'm doing wrong, since Google tells me it should work
> without popping up a DOS-Box window.
>
> Could anyone please post me some advice (or tell me where to obtain the
> sources)?
>
>
> Thx,
> Oliver
>


--
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] 3+ messages in thread

* Re: Windows 7 64 Bit flashes DOSBox visible on Desktop when using run-1.3.0 or run2-0.4.2 to start Cygwin commands
  2014-01-28 11:15 ` Marco Atzeri
@ 2014-01-28 13:13   ` dyle
  0 siblings, 0 replies; 3+ messages in thread
From: dyle @ 2014-01-28 13:13 UTC (permalink / raw)
  To: cygwin

Hi,

On Tue, 28 Jan 2014 12:15:31 +0100, Marco Atzeri <marco.atzeri@gmail.com>
wrote:
> On 28/01/2014 10:37, dyle wrote:
>> Hi *,
...
> if you need to run a series of command, why don't you use
> the mintty terminal ?

The User should not get any Window at all. Not even a mintty.

> I do not understand what are you trying to achieve with run,
> it seems the wrong tool for your example.
> 
> If you want to put a stop just before closing the scripts,
> just add a read
> "#!/bin/sh <CR> ls -1 | > wc -l > count_file.txt <CR> read"
> 
> and it will wait a "Return" before completing the script and
> closing the window.

The problem is not the too-fast closing of the window but its opening in
the first place. The script above is a mere example.

>> Also I looked up the cygwin (and winsup) sources but was not lucky to
>> find
>> any code or run or run2. And there's no reference whatsoever in
>> /usr/share/doc/run and /usr/share/doc/run2 on where to *obtain* the
>> sources
>> for these packages. They do not seem to be included in the regular
cygwin
>> CVS.
> 
> use setup do download the source package.
> All sources are available on "Select Packages" window,
> forth column is called "Scr ?"
> 
> Check the box, it will be deployed in "/usr/src"

GREAT! Thank you Marco!

With this I see, that the error is clearly at run2_gpl.c at line 350ff:

   if (bUseMessageOnlyWorkaround)
     {
       if (!bHaveConsole)
         {
           AllocConsole ();
           bHaveConsole = TRUE;
           SetParent ((*GetConsoleWindowFP) (), HWND_MESSAGE);
         }
     }
   else if (!bHaveConsole)
     {
       bHaveConsole = run2_setup_invisible_console ();
     }


For Windows 7 the bUseMessageOnlyWorkaround is always TRUE and as I do not
have a Console Window yet the AllocConsole() function of Win32 API is
called.

This pops up a Console Window. A DOS-BOX. And there is no help to this.
Windows 7 just goes on, fires up a Window and places a cmd-prompt inside
it. Right in your face. :(

If I comment this line with

           // AllocConsole ();

then my scripts do work as expected: No DOS-BOX window pops up. Yeee!

Though stdout, stderr might be messy then. I might run in other troubles,
since there's a reason for this call. But so far this ok for me (yet).


Thx,
Oliver

--
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] 3+ messages in thread

end of thread, other threads:[~2014-01-28 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-28  9:37 Windows 7 64 Bit flashes DOSBox visible on Desktop when using run-1.3.0 or run2-0.4.2 to start Cygwin commands dyle
2014-01-28 11:15 ` Marco Atzeri
2014-01-28 13:13   ` dyle

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).