Wednesday, August 22, 2012

Using "reset" instead of "stty sane" to clean up ncurses mess in terminal after a crash - Stack Overflow

It's nice to know about the terminal program having a "reset" command (in mine it's in a pulldown menu); I had already concluded that "stty sane" wasn't helping in the current terminal program I'm using...  I have a way of accidentally "more"-ing binary files, which has the same symptom...

I am drawing a TUI using ncurses. The trouble is that whenever my program gets seg-fault, my terminal is left in mess. I can not see what I am typing. Its a pain since I am working over ssh. I have mitigated some of the effect by using screen.
I would like to know if there is a command which will refresh my terminal after seg-fault in ncurses so that my terminal starts behaving normally.
share|edit

73% accept rate
Most terminal programs have a "reset" option which puts the terminal back into its initial state - useful for situations like this - check the menus in your program. – Paul R Aug 1 at 6:50


Clean up ncurses mess in terminal after a crash - Stack Overflow

'via Blog this'

No comments:

Post a Comment