Bug 1143 - /usr/bin/reset doesn't reset enough things
/usr/bin/reset doesn't reset enough things
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: ncurses (Show other bugs)
5.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-02-13 03:14 EST by Marc MERLIN
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-08-27 20:00:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marc MERLIN 1999-02-13 03:14:07 EST
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@merlins.org> 02/13/99 03:16 -------
Comment 1 David Lawrence 1999-04-06 15:05:59 EDT
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 18:00:59 EDT
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@gnu.org in the bugzilla Cc
line, but if you would like this fixed long term for everyone
I'd suggest contacting bug-ncurses@gnu.org 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 02:36:59 EDT
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-27 20:00:59 EDT
Fixed in ncurses-4.2-21 and later
Comment 5 Paul J Murphy 2000-01-03 03:43:59 EST
$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

Note You need to log in before you can comment on or make changes to this bug.