Recover tput terminal settings - specifically for Cygwin
by plu from LinuxQuestions.org on (#5279H)
I can't find the exactly applicable forum group, since there's no Cygwin distribution group, so am posting in the General section.
I believe the use of the "tput" utility is only one-way in regards to setting up the terminal, so am having major problems getting my serial port to work properly again (on Cygwin).
On Cygwin (2.6.1), I ran "tput reset" in the process of trying to clean up terminal operations, and this totally messed up my previously working set-up. Apparently, the default terminal setup (string) on Cygwin does not agree with the tput settings for TERM=xterm. So, when I ran "tput reset" the terminal got configured in some odd way such that I/O to some COM/tty port no longer works (seems to be character verses line processing, or some such thing). Minicom to that serial port, which worked fine before, doesn't work any more; seems user-entered text doesn't arrive at the remote end until the user exits Minicom.
I have tried "tput init" and similar things but they don't revert the terminal to the old way.
I have other Win/Cygwin systems that still have functional terminal set-ups (where I never ran "tput reset"), so one would think there should be some way of querying the terminal for its current operating settings (rather than the tput database, which is apparently wrong). But, it seems that since the terminal can only be "configured" item-by-item, there is no way to get the full configuration information from the terminal itself. If getting the operating settings (string) is possible, then I would be able to transfer that string to the broken system and fix its problem.
Can someone offer me some ideas on how to fix my problem?
Thank you very much in advance.


I believe the use of the "tput" utility is only one-way in regards to setting up the terminal, so am having major problems getting my serial port to work properly again (on Cygwin).
On Cygwin (2.6.1), I ran "tput reset" in the process of trying to clean up terminal operations, and this totally messed up my previously working set-up. Apparently, the default terminal setup (string) on Cygwin does not agree with the tput settings for TERM=xterm. So, when I ran "tput reset" the terminal got configured in some odd way such that I/O to some COM/tty port no longer works (seems to be character verses line processing, or some such thing). Minicom to that serial port, which worked fine before, doesn't work any more; seems user-entered text doesn't arrive at the remote end until the user exits Minicom.
I have tried "tput init" and similar things but they don't revert the terminal to the old way.
I have other Win/Cygwin systems that still have functional terminal set-ups (where I never ran "tput reset"), so one would think there should be some way of querying the terminal for its current operating settings (rather than the tput database, which is apparently wrong). But, it seems that since the terminal can only be "configured" item-by-item, there is no way to get the full configuration information from the terminal itself. If getting the operating settings (string) is possible, then I would be able to transfer that string to the broken system and fix its problem.
Can someone offer me some ideas on how to fix my problem?
Thank you very much in advance.