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 flashes non-hidden console window in cygwin64 on Win7Pro-64

On 21 October 2014 10:51, John Wiersba wrote:
> I'm trying to use run.exe to avoid a flashing console window, but it is not working on my cygwin64 install on Win7Pro-64.  This is a fresh install from 10/20/2014.  I've attached my cygcheck.out.  I've tried the following windows shortcuts and all cause a console window to briefly flash (in the case of mintty a console window flashes before the mintty terminal is displayed).
>   D:\cygwin\bin\run.exe /bin/bash -c "echo hi"
>   D:\cygwin\bin\run.exe /bin/env -i PATH=/bin bash --norc -c "echo hi"
>   D:\cygwin\bin\run.exe /bin/env -i PATH=/bin mintty bash --norc
> Since hiding the console window is the main purpose of run.exe, it seems that it is badly broken for Win7Pro-64.

Short answer: minimize the shortcut window.

Long answer: In windows explorer, right click on the shortcut and
select "Properties" from the context menu (it's the last item). On the
"Shortcut" tab (it's the default tab), change the value of the drop
down labeled "Run:" from "Normal window" to "Minimized". Click "OK".

Now, that flashing window will open minimized, which is much less
noticeable. It may not even paint on the task bar before the mintty
window opens. On my machine, the mintty icon paints to the right of a
blank icon space, and immediately slides left to abut the previous
icons on the task bar. If your task bar is hidden, you may not even
see that.

For clarity, let me describe the process for creating your shortcut:
In windows explorer, right click in a directory (i.e. the right pane),
select "New" -> "Shortcut". In the frst panel of the shortcut wizard,
enter "D:\cygwin\bin\run.exe" as the location. At this point you can
only enter the name of the executable without command line arguments.
Click "Next" and in the second panel of the shortcut wizard, enter a
name for the shortcut and click "OK". Now right click on the shortcut
and select "Properties". On the "Shortcut" tab, change the Target:"
text box to add arguments to the exe's command line, so the box
contains "D:\cygwin\bin\run.exe /bin/env -i PATH=/bin mintty bash
--norc". You could also change the target to "D:\cygwin\bin\env.exe -i
PATH=/bin mintty bash --norc" with equivalent result. Or even
"D:\cygwin64\bin\mintty.exe ./env.exe -i PATH=/bin bash --norc", now
you set "Run:" to "Normal window".

BTW, this search may help to discover how to create a shortcut from
the command line.


Doug Henderson, Calgary, Alberta, Canada

Problem reports:
Unsubscribe info:

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