Re: CYGWIN=tty round 2
On Mon, May 23, 2011 at 07:21:16PM -0400, Ryan Johnson wrote: On 22/05/2011 10:53 PM, Yaakov (Cygwin/X) wrote: On Sun, 2011-05-22 at 17:19 -0400, Christopher Faylor wrote: I don't think we saw anyone step forward with a valid reason why they needed to use CYGWIN=tty over something like mintty. I've summarized the thread where Corinna asked why people used CYGWIN=tty over CYGWIN=notty below. I don't see any showstoppers here so unless people can provide specific examples of how this change would cause hardwhip, we'll be removing CYGWIN=tty in a snapshot near you soon. I could add XWin: http://sourceware.org/bugzilla/show_bug.cgi?id=9763 And once again, using mintty is a solution. Since mintty is the solution to so many of these scenarios, shouldn't we make it the default terminal (IOW add mintty to Base and replace the Cygwin.bat shortcut with mintty's)? The status quo just encourages people to use a deficient terminal without any idea that a better one exists. I would be happy to see mintty as the default. Since discovering it I essentially stopped using X because xterm was my main reason for firing it up. However... isn't there some dire warning that gdb only will ever work properly (some of the time) from within a vanilla console window? Something to do with ^C handling? Mind you, I'd love that restriction to be lifted, but it sounded pretty hard and fast the last few times the topic came up. On the other hand, most casual cygwin users won't be needing gdb often, if ever, so that might not be enough reason to keep the console over mintty. Can we PLEASE stay on topic? This has nothing to do with CYGWIN=tty. If gdb didn't work in mintty it wouldn't work with CYGWIN=tty either. -- 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
Re: CYGWIN=tty round 2
On 24/05/2011 2:22 AM, Christopher Faylor wrote: On Mon, May 23, 2011 at 07:21:16PM -0400, Ryan Johnson wrote: On 22/05/2011 10:53 PM, Yaakov (Cygwin/X) wrote: On Sun, 2011-05-22 at 17:19 -0400, Christopher Faylor wrote: I don't think we saw anyone step forward with a valid reason why they needed to use CYGWIN=tty over something like mintty. I've summarized the thread where Corinna asked why people used CYGWIN=tty over CYGWIN=notty below. I don't see any showstoppers here so unless people can provide specific examples of how this change would cause hardwhip, we'll be removing CYGWIN=tty in a snapshot near you soon. I could add XWin: http://sourceware.org/bugzilla/show_bug.cgi?id=9763 And once again, using mintty is a solution. Since mintty is the solution to so many of these scenarios, shouldn't we make it the default terminal (IOW add mintty to Base and replace the Cygwin.bat shortcut with mintty's)? The status quo just encourages people to use a deficient terminal without any idea that a better one exists. I would be happy to see mintty as the default. Since discovering it I essentially stopped using X because xterm was my main reason for firing it up. However... isn't there some dire warning that gdb only will ever work properly (some of the time) from within a vanilla console window? Something to do with ^C handling? Mind you, I'd love that restriction to be lifted, but it sounded pretty hard and fast the last few times the topic came up. On the other hand, most casual cygwin users won't be needing gdb often, if ever, so that might not be enough reason to keep the console over mintty. Can we PLEASE stay on topic? This has nothing to do with CYGWIN=tty. If gdb didn't work in mintty it wouldn't work with CYGWIN=tty either. Sorry... I got distracted by the mintty-as-default tangent. Back on topic, I have never used CYGWIN=tty (I kept forgetting to set it even when directed to do so by various inaccurate how-tos out ther) and would not miss it. Ryan -- 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
mintty vs runas (was: Re: CYGWIN=tty round 2)
On 23 May 2011 22:24, Angelo Graziosi wrote: I want to flag that this: /cygdrive/c/WINDOWS/system32/runas.exe /user:pippo 'C:\cygwin-2\bin\bash --login -i' works in a dos-like shell (Cygwin.bat) but not in mintty. That's yet another case of a non-Cygwin program expecting to talk to a Windows console rather than the pipes underlying Cygwin's pseudo terminal device implementation. Even runas's help output doesn't work in mintty, which suggests that it's using console-specific functions for all its I/O. Is there some trick to do the job also in mintty? Not within it, but you could invoke mintty itself as administrator with right-click-Run As or by changing its shortcut to invoke it through runas. Andy -- 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
Re: mintty vs runas (was: Re: CYGWIN=tty round 2)
Andy Koppe wrote: you could invoke mintty itself as administrator with right-click-Run As or by changing its shortcut to invoke it through runas. Thanks for the suggestions! Ciao, Angelo. -- 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
Re: CYGWIN=tty round 2
On Sun, May 22, 2011 at 09:53:12PM -0500, Yaakov (Cygwin/X) wrote: On Sun, 2011-05-22 at 17:19 -0400, Christopher Faylor wrote: I don't think we saw anyone step forward with a valid reason why they needed to use CYGWIN=tty over something like mintty. I've summarized the thread where Corinna asked why people used CYGWIN=tty over CYGWIN=notty below. I don't see any showstoppers here so unless people can provide specific examples of how this change would cause hardwhip, we'll be removing CYGWIN=tty in a snapshot near you soon. I could add XWin: http://sourceware.org/bugzilla/show_bug.cgi?id=9763 And once again, using mintty is a solution. Since mintty is the solution to so many of these scenarios, shouldn't we make it the default terminal (IOW add mintty to Base and replace the Cygwin.bat shortcut with mintty's)? The status quo just encourages people to use a deficient terminal without any idea that a better one exists. I may be missing something but I don't see how the above is not a bug. The symptom was mentioned in the previous thread. Unless xwin.exe goes out of its way to reattach to its calling console (by doing something similar to what setup.exe does) there is no stdout/stderr to write to. Windows resets the stdin/stdout/stderr of Windows GUI apps which are run from a console. cgf -- 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
Re: CYGWIN=tty round 2
Am 22.05.2011 23:19, schrieb Christopher Faylor: mintty I have the feeling, you should make mintty default :-) (for startup menu shortcuts, etc.) -- 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
Re: CYGWIN=tty round 2
On Mon, May 23, 2011 at 11:35:40AM +0200, Sven Köhler wrote: Am 22.05.2011 23:19, schrieb Christopher Faylor: mintty I have the feeling, you should make mintty default :-) (for startup menu shortcuts, etc.) http://cygwin.com/ml/cygwin-apps/2010-05/msg00082.html -- Huella de clave primaria: AD8F BDC0 5A2C FD5F A179 60E7 F79B AB04 5299 EC56 signature.asc Description: Digital signature
Re: CYGWIN=tty round 2
On 23 May 2011 03:53, Yaakov wrote: I've summarized the thread where Corinna asked why people used CYGWIN=tty over CYGWIN=notty below. I don't see any showstoppers here so unless people can provide specific examples of how this change would cause hardwhip, we'll be removing CYGWIN=tty in a snapshot near you soon. I could add XWin: http://sourceware.org/bugzilla/show_bug.cgi?id=9763 For some reason which I have yet to investigate, XWin requires a tty to the log to the terminal. That means it will output to terminal in VTs, but will not work in ordinary cmd/bash shells without setting CYGWIN=tty; instead you will see a cmd window briefly flashing on screen when launched. The reason is that XWin.exe is built with -Wl,--subsystem,windows (or -mwindows, which implies it), which allows it to be invoked directly from a shortcut or the Run.. dialog without popping up a console or requiring a console hiding hack. (It's the same for mintty.) The downside is that Windows also won't hook it up to the parent process's console, even if there is one, and hence there's nowhere for Cygwin to hook the standard file descriptors up to. Having said that, XP introduced the AttachConsole() function, which allows hooking up to the parent's console by pasing 'ATTACH_PARENT_PROCESS' as the paremeter. It would be very nice if the Cygwin DLL could try that (followed by CreateFile(CONIN$/CONOUT$, ...)) when GetStdHandle returns an invalid handle while initialising the standard file descriptors. Andy -- 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
Re: CYGWIN=tty round 2
On May 23 12:49, Andy Koppe wrote: The reason is that XWin.exe is built with -Wl,--subsystem,windows (or -mwindows, which implies it), which allows it to be invoked directly from a shortcut or the Run.. dialog without popping up a console or requiring a console hiding hack. (It's the same for mintty.) The downside is that Windows also won't hook it up to the parent process's console, even if there is one, and hence there's nowhere for Cygwin to hook the standard file descriptors up to. Having said that, XP introduced the AttachConsole() function, which allows hooking up to the parent's console by pasing 'ATTACH_PARENT_PROCESS' as the paremeter. That doesn't work as expected. I found that GetStdHandle does not return INVALID_HANDLE_VALUE. Rather, the handle looks like a normal console handle. Calling GetFileType then returns FILE_TYPE_UNKNOWN and GetLastError () returns ERROR_INVALID_HANDLE. I used that to add this code: Index: dtable.cc === RCS file: /cvs/src/src/winsup/cygwin/dtable.cc,v retrieving revision 1.221 diff -u -p -r1.221 dtable.cc --- dtable.cc 5 May 2011 22:30:53 - 1.221 +++ dtable.cc 23 May 2011 15:35:49 - @@ -282,7 +282,10 @@ dtable::init_std_file_from_handle (int f char name[NT_MAX_PATH]; name[0] = '\0'; if (ft == FILE_TYPE_UNKNOWN GetLastError () == ERROR_INVALID_HANDLE) -/* can't figure out what this is */; +{ + if (AttachConsole (-1) || GetLastError () == ERROR_ACCESS_DENIED) + dev = *console_dev; +} else if (ft == FILE_TYPE_PIPE) { int rcv = 0, len = sizeof (int); In thoery that should attach to the console and open the console handles for stdin/out/err. The effect: - Started from CMD, XWin prints log output to the console. - Started from bash or tcsh, no output. - Mintty doesn't start at all. That doesn't look overly promising. It might be better if XWin itself tries the AttachConsole/CreateFile(CONOUT$) thingy instead, otherwise we might end up with some overly complex startup code(*) just for the benefit of a single application. Corinna (*) Insert which already is overly complex here. -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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
Re: CYGWIN=tty round 2
[sorry. I don't seem to be able to send a typo-free message lat3ly.] On Mon, May 23, 2011 at 02:02:04AM -0400, Christopher Faylor wrote: On Sun, May 22, 2011 at 09:53:12PM -0500, Yaakov (Cygwin/X) wrote: On Sun, 2011-05-22 at 17:19 -0400, Christopher Faylor wrote: I don't think we saw anyone step forward with a valid reason why they needed to use CYGWIN=tty over something like mintty. I've summarized the thread where Corinna asked why people used CYGWIN=tty over CYGWIN=notty below. I don't see any showstoppers here so unless people can provide specific examples of how this change would cause hardwhip, we'll be removing CYGWIN=tty in a snapshot near you soon. I could add XWin: http://sourceware.org/bugzilla/show_bug.cgi?id=9763 And once again, using mintty is a solution. Since mintty is the solution to so many of these scenarios, shouldn't we make it the default terminal (IOW add mintty to Base and replace the Cygwin.bat shortcut with mintty's)? The status quo just encourages people to use a deficient terminal without any idea that a better one exists. I may be missing something but I don't see how the above is not a bug. is a bug. -- 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
Re: CYGWIN=tty round 2
Following this thread and the similar http://cygwin.com/ml/cygwin-apps/2011-05/msg00041.html I want to flag that this: /cygdrive/c/WINDOWS/system32/runas.exe /user:pippo 'C:\cygwin-2\bin\bash --login -i' works in a dos-like shell (Cygwin.bat) but not in mintty. Is there some trick to do the job also in mintty? Thanks, Angelo. -- 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
RE: CYGWIN=tty round 2
Angelo Graziosi wrote: /cygdrive/c/WINDOWS/system32/runas.exe /user:pippo 'C:\cygwin-2\bin\bash --login -i' works in a dos-like shell (Cygwin.bat) but not in mintty. Is there some trick to do the job also in mintty? Angelo, I'm not completely sure about what you are trying to do, but this works for me to get a shell running under the proper user: $ cat bldmgr.bat runas /user:proddev\bldmgr c:\cygwin\bin\mintty.exe - Eric Fahlgren
RE: CYGWIN=tty round 2
Hi Eric, but this works for me to get a shell running under the proper user: runas /user:proddev\bldmgr c:\cygwin\bin\mintty.exe - yes, also for me, but *only* from Cygwin.bat shell not from MinTTY: here it asks for password and return the prompt without waiting for password typing. I would like to start MinTTY, running under the proper user, from MinTTY and not from Cygwin.bat. Ciao, Angelo. -- 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
Re: CYGWIN=tty round 2
On Mon, May 23, 2011 at 11:24:21PM +0200, Angelo Graziosi wrote: Following this thread and the similar http://cygwin.com/ml/cygwin-apps/2011-05/msg00041.html I want to flag that this: /cygdrive/c/WINDOWS/system32/runas.exe /user:pippo 'C:\cygwin-2\bin\bash --login -i' works in a dos-like shell (Cygwin.bat) but not in mintty. Is there some trick to do the job also in mintty? This has nothing to do with CYGWIN=tty. No one is saying that you won't be able to type bash at in a CMD window and have it work. And, no one is saying that cygwin.bat will stop working. cgf -- 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
Re: CYGWIN=tty round 2
On 22/05/2011 10:53 PM, Yaakov (Cygwin/X) wrote: On Sun, 2011-05-22 at 17:19 -0400, Christopher Faylor wrote: I don't think we saw anyone step forward with a valid reason why they needed to use CYGWIN=tty over something like mintty. I've summarized the thread where Corinna asked why people used CYGWIN=tty over CYGWIN=notty below. I don't see any showstoppers here so unless people can provide specific examples of how this change would cause hardwhip, we'll be removing CYGWIN=tty in a snapshot near you soon. I could add XWin: http://sourceware.org/bugzilla/show_bug.cgi?id=9763 And once again, using mintty is a solution. Since mintty is the solution to so many of these scenarios, shouldn't we make it the default terminal (IOW add mintty to Base and replace the Cygwin.bat shortcut with mintty's)? The status quo just encourages people to use a deficient terminal without any idea that a better one exists. I would be happy to see mintty as the default. Since discovering it I essentially stopped using X because xterm was my main reason for firing it up. However... isn't there some dire warning that gdb only will ever work properly (some of the time) from within a vanilla console window? Something to do with ^C handling? Mind you, I'd love that restriction to be lifted, but it sounded pretty hard and fast the last few times the topic came up. On the other hand, most casual cygwin users won't be needing gdb often, if ever, so that might not be enough reason to keep the console over mintty. Ryan -- 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
CYGWIN=tty round 2
I don't think we saw anyone step forward with a valid reason why they needed to use CYGWIN=tty over something like mintty. I've summarized the thread where Corinna asked why people used CYGWIN=tty over CYGWIN=notty below. I don't see any showstoppers here so unless people can provide specific examples of how this change would cause hardwhip, we'll be removing CYGWIN=tty in a snapshot near you soon. Summary: 0) There was some confusion over what Corinna meant by CYGWIN=notty. Response: Corinna thought (as did I) that people would understand that CYGWIN=notty is the default. It's what you get if you haven't added tty to the CYGWIN environment variable. And, if you don't know what any of that means then this whole discussion is not something that you have to worry about. 1) People thought that because CYGWIN=tty was mentioned in an example in the documentation, it was actually a recommendation. Response: It was not a recommendation (if it was it would have been the default). It has been removed from the documentation. 2) screen needs CYGWIN=tty for reattach to work. Response: Use mintty. Or, possibly proposed changes for 9 below will cause reattach to work with screen. 3) emacs requires CYGWIN=tty for CTRL-C to work. Response: Use mintty. Long-term possibly get CTRL-C working with the cygwin console. 4) sshd requires CYGWIN=tty. Response: Pure unadulterated rumor. This was never the case unless you needed to inexplicably slow down sshd for some unknown reason. 5) brltty might need it. Response: brltty doesn't need it. 6) It made something I cared about work properly and four M$ operating systems later... Response: Use mintty or provide a specific example of failure. 7) There's a bug in Cygwin's console handling. Response: We'll (eventually) fix the bug. 8) Not a power user and don't understand the question Response: Don't worry about it then. You probably aren't using the setting. 9) With CYGWIN=tty, each console window gets its own /dev/ttyN. For console windows everything gets /dev/console and, so, there is no way to distinguish between console windows. Response: Cygwin will be changed to cause each console window to have its own unique /dev/consN numbering, similar to /dev/ttyN. 10) The non-cygwin application jam inexplicably seems to require it for proper operation. Response: One workaround was suggested when dealing with console mode but it seems that mintty would also cause jam to work ok as well. -- 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
Re: CYGWIN=tty round 2
On Sun, 2011-05-22 at 17:19 -0400, Christopher Faylor wrote: I don't think we saw anyone step forward with a valid reason why they needed to use CYGWIN=tty over something like mintty. I've summarized the thread where Corinna asked why people used CYGWIN=tty over CYGWIN=notty below. I don't see any showstoppers here so unless people can provide specific examples of how this change would cause hardwhip, we'll be removing CYGWIN=tty in a snapshot near you soon. I could add XWin: http://sourceware.org/bugzilla/show_bug.cgi?id=9763 And once again, using mintty is a solution. Since mintty is the solution to so many of these scenarios, shouldn't we make it the default terminal (IOW add mintty to Base and replace the Cygwin.bat shortcut with mintty's)? The status quo just encourages people to use a deficient terminal without any idea that a better one exists. Yaakov -- 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