Recover tput terminal settings - specifically for Cygwin
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Recover tput terminal settings - specifically for Cygwin
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?
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.
Fixed problem. The "tput reset" somehow changed the flow control settings, so the
communication was blocked. Had to fix appropriate settings in Minicom and via
stty to ignore hardware flow control.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.