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 - /usr/bin/reset doesn't reset enough things
Summary: /usr/bin/reset doesn't reset enough things
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ncurses
Version: 5.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-02-13 08:14 UTC by Marc MERLIN
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-08-28 00:00:58 UTC


Attachments (Terms of Use)

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:
#!/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 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 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 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


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