Bug 151845

Summary: /usr/bin/reset does not work properly with X terminal programs
Product: [Fedora] Fedora Reporter: Need Real Name <rh>
Component: ncursesAssignee: Fedora Legacy Bugs <bugs>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: dickey, mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-02 12:12:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2005-03-22 20:42:23 UTC
Description of problem:

/usr/bin/reset does not work properly with xterm.  It moves the cursor to the
home position, but does not reset the terminal.  It likewise doesn't work with
konsole and gnome-terminal.  It DOES work properly on a virtual console.

Version-Release number of selected component (if applicable):


How reproducible:

always

Steps to Reproduce:
1. open xterm
2. run some command (so there's stuff in the window)
3. run reset
  
Actual results:

The screen is not cleared and the terminal is not reset.  If programs terminate
improperly while the terminal is in an alternate state, reset does not restore
default terminal settings.

Expected results:

screen is cleared and terminal is reset, restoring the terminal to its default
state.

Additional info:

It worked fine in RH9 and all previous versions -- I didn't use FC1 so I can't
speak to that.  I'm guessing the problem occurred because of the switch from
XFree86 to xorg...

Comment 1 Thomas E. Dickey 2005-04-10 19:59:08 UTC
reset is part of ncurses.
xterm hasn't changed with respect to that.
The first thing I would check would be the terminal description.

Comment 2 Matthew Miller 2005-04-26 16:34:29 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 3 Matthew Miller 2005-09-02 12:12:42 UTC
(See comment #2 above...)

But also, this worked fine for me in FC2.

Comment 4 Petr Raszyk 2005-09-02 13:04:05 UTC
We could not reproduce your issue in FEDORA CORE 4.
We have tried your example using xterm, linux-console, gnome-terminal

Launch at command prompt:

   tput smso      #Set a terminal in 'reverse mode' (reverse       
                  #background/foreground color).
   tput smacs     #Set a terminal in 'alternate character set' mode.
   blablabla      #Write any text, then press the Enter-key.
   reset          #After the reset command, the screen is clear and the 
                  #terminal is reset.

NOTE: only gnome-terminal does not clear the terminal window and does not move 
      the current cursor to position (0,0). This can be a small bug in 
      gnome-termnal (the 'clear' command at the command prompt helps in
      this case).
      The library ncurses defines the terminal-initial-state as 
     'clear window' + 'current cursor at (0,0)' but the 'reset' command does
      not say anything about 'clear window'/'cursor at 0,0'. We can see this 
     'small bug' as gnome-terminal property.
      The reset-program uses ncurses library to obtain a Esc-sequence to reset 
      a terminal.
      The library ncurses use /usr/share/terminfo/*/* database to retreive the
      Esc-sequence.
      The 'gnomme-terminal' uses the same terminfo-databese-record as 'xterm' 
      (TERM=xterm). Therefore, this is not a bug in terminfo/termcap database.
      If you see this gnome-terminal behaviour as a bug, open a new issue as 
      a bug in gnome-terminal.
      
Petr Raszyk