Shouldn't the console-hiding code be unnecessary? Here is a simple approach that I have been using (and have written to this list previously) which makes it possible to start rxvt without resorting to starting a console first:
Using a "direct" shortcut instead of shortcutting/running the batch file has another advantage, when you're not using rxvt but windows console. Case 1: 1) Run the batch file (through the default cygwin shortcut, via explorer or whatever) which launches bash in a windows console 2) 'exit' the login shell Window closes. All is fine. Case 2: 1) Run the batch file (through a shortuct, via explorer or whatever) which launches bash in a windows console 2) press CTRL-C anytime (shell or not) 3) 'exit' the login shell A message pops up: "Terminer le programme de commandes (O/N)?" in french (translated: "End batch file (Y/N)?"). Signal was not only handled by cygwin, but is also handled by the .bat interpreter, which interrupts its execution upon bash return, and ask for interactive confirmation. Stupid, as the .bat is at the end anyway (although it might change its return code). Anyway, that's annoying. Case 3: 1) Run a 'direct' shortcut which launches bash directly (c:\cygwin\bin\bash --login -i), built as it has been suggested and as I did prior to using rxvt or puttycyg. 2) press CTRL-C anytime (shell or not) 3) 'exit' the login shell Window closes. All is fine. Then I switched to rxvt based on this shortcut, and discovered only recently that rxvt pops up a console window and that my shortcut thingie was a heck of a workaround. So I concluded that running .bat files/console was definitely to be promoted on my list of Most Annoying Things Ever. Lloeki