This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: run.exe flashes non-hidden console window in cygwin64 on Win7Pro-64
- From: Doug Henderson <djndnbvg at gmail dot com>
- To: cygwin <cygwin at cygwin dot com>
- Date: Thu, 23 Oct 2014 13:40:10 -0600
- Subject: Re: run.exe flashes non-hidden console window in cygwin64 on Win7Pro-64
- Authentication-results: sourceware.org; auth=none
- References: <1413488630 dot 82429 dot YahooMailNeo at web162806 dot mail dot bf1 dot yahoo dot com> <544055FF dot 2030604 at cs dot umass dot edu> <1413517183 dot 86611 dot YahooMailNeo at web162801 dot mail dot bf1 dot yahoo dot com> <1413517863 dot 36122 dot YahooMailNeo at web162806 dot mail dot bf1 dot yahoo dot com> <54411638 dot 2000104 at cs dot umass dot edu> <1413910316 dot 59036 dot YahooMailNeo at web162803 dot mail dot bf1 dot yahoo dot com>
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.
https://www.google.com/search?q=create+windows+shortcut+command+line
Doug
--
Doug Henderson, Calgary, Alberta, Canada
--
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