Forwarding a really old bug report to bugzilla This includes the background color in an xterm or rxvt, and xterm mouse reporting. How to reproduce? start midnight commander (mc), killall -9 mc. This should leave you with a prompt on a colored background. Also, if you try to cut and paste with the mouse, you'll notice it won't work unless you also press shift. I have the following wrapper around reset: #!/bin/sh # Xterm codes can be found here: # http://babayaga.math.fu-berlin.de/~rxvt/refer/refer.html if [ a"$TERM" = axterm -o a"$TERM" = axterm-color -o \ a"$TERM" = akterm -o a"$TERM" = arxvt ]; then # Disable X11 XTerm mouse reporting # Replace ESC with ^V^[ echo 'ESC[?1000l' # Reset foreground and background colors # Replace ESC with ^V^[ echo 'ESC[0m' fi # Reset the terminal /usr/bin/reset # Reset terminal size if [ -f /usr/X11R6/bin/resize ]; then eval `resize` fi ------- Email Received From Marc Merlin <marc> 02/13/99 03:16 -------
I have verified that when mc is killed the xterm display is not restored properly when the reset command is used.
Judging from the comments: /* What about rf, rs3, as per terminfo man page? */ /* also might be nice to send rmacs, rmul, rmm */ in the tset.c source file (reset is a link to tset), it looks like the authors of ncurses themselves can't decide what the right thing is to do. I hesitate to copy bug-ncurses in the bugzilla Cc line, but if you would like this fixed long term for everyone I'd suggest contacting bug-ncurses and asking if they have reasons for not doing all the resetting they can; if they change it, we'll naturally pick it up in time. That's better than us making the change unilaterally. Also, they clearly made a decision not to do all the resetting; they may have reasons not to reset everything by default that we haven't thought of.
I'll try that. Would you consider in the meantime having a shell script wrapper, and possibly call it resetall or something, if you want to make sure that you don't brake the existing behavior of reset?
Fixed in ncurses-4.2-21 and later
$RPM_BUILD_ROOT is missing from the install of /usr/bin/resetall in ncurses.spec supplied with ncurses-4.2-25.src.rpm, so it doesn't get installed. The following patch fixes it: --- ncurses.spec.dist Thu Sep 23 18:50:17 1999 +++ ncurses.spec.resetall Mon Jan 3 08:26:02 2000 @@ -70,7 +70,7 @@ make clean -C test # the resetall script -install -m 755 %{SOURCE4} /usr/bin/resetall +install -m 755 %{SOURCE4} $RPM_BUILD_ROOT/usr/bin/resetall %post -p /sbin/ldconfig