Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1143

Summary: /usr/bin/reset doesn't reset enough things
Product: [Retired] Red Hat Linux Reporter: Marc MERLIN <marc_soft>
Component: ncursesAssignee: Cristian Gafton <gafton>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-08-28 00:00:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Marc MERLIN 1999-02-13 08:14:07 UTC
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:

# Xterm codes can be found here:
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'

# Reset the terminal

# Reset terminal size
if [ -f /usr/X11R6/bin/resize ]; then
        eval `resize`

------- Email Received From  Marc Merlin <> 02/13/99 03:16 -------

Comment 1 David Lawrence 1999-04-06 19:05:59 UTC
I have verified that when mc is killed the xterm display is not
restored properly when the reset command is used.

Comment 2 Michael K. Johnson 1999-04-09 22:00:59 UTC
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 in the bugzilla Cc
line, but if you would like this fixed long term for everyone
I'd suggest contacting 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.

Comment 3 Marc MERLIN 1999-04-14 06:36:59 UTC
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?

Comment 4 Cristian Gafton 1999-08-28 00:00:59 UTC
Fixed in ncurses-4.2-21 and later

Comment 5 Paul J Murphy 2000-01-03 08:43:59 UTC
$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