From steve@dylan.visint.co.uk  Fri Nov 14 04:23:30 1997
Received: from dylan.visint.co.uk (dylan.visint.co.uk [194.207.134.180])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA24202
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Nov 1997 04:23:26 -0800 (PST)
          (envelope-from steve@dylan.visint.co.uk)
Received: (from steve@localhost)
	by dylan.visint.co.uk (8.8.5/8.8.5) id MAA02257;
	Fri, 14 Nov 1997 12:23:23 GMT
Message-Id: <199711141223.MAA02257@dylan.visint.co.uk>
Date: Fri, 14 Nov 1997 12:23:23 GMT
From: steve@visint.co.uk
Reply-To: steve@visint.co.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: libdialog fails to resore terminal
X-Send-Pr-Version: 3.2

>Number:         5039
>Category:       gnu
>Synopsis:       libdialog fails to resore terminal
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 14 04:30:01 PST 1997
>Closed-Date:    Thu Dec 9 01:59:31 PST 1999
>Last-Modified:  Thu Dec  9 01:59:47 PST 1999
>Originator:     Steve Roome
>Release:        FreeBSD 3.0-970618-SNAP i386
>Organization:
Vision Interactive
>Environment:
	Using zsh-3.0.2 in an xterm under XF86_S3 3.3
	(although this will happen in almost any terminal I think)

>Description:
	After using anything which uses libdialog (or the code from it)
	the terminal state isn't properly restored.

>How-To-Repeat:
	dialog --infobox "Go reset your terminal" 3 35

	(or use anything like sysinstall or whatever)

>Fix:
	Obvious! Save inital term state and restore it afterwards.
	(There's a lot of places this needs to be done though.)
>Release-Note:
>Audit-Trail:

From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
To: steve@visint.co.uk
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: gnu/5039: libdialog fails to resore terminal 
Date: Fri, 14 Nov 1997 05:56:18 -0800

 > 	dialog --infobox "Go reset your terminal" 3 35
 
 This seems to work just fine for me.  Can you be more explicit about
 which terminal parameters are being left hosed?
 
 					Jordan

From: Stephen Roome <steve@visint.co.uk>
To: "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: gnu/5039: libdialog fails to resore terminal 
Date: Fri, 14 Nov 1997 15:09:35 +0000 (GMT)

 On Fri, 14 Nov 1997, Jordan K. Hubbard wrote:
 
 > > 	dialog --infobox "Go reset your terminal" 3 35
 > 
 > This seems to work just fine for me.  Can you be more explicit about
 > which terminal parameters are being left hosed?
 
 Ok, usually I do the following:
 
 1) start a clean xterm or rxvt
 	[There's no problem with syscons, not tried console vt220]
 
 2) rlogin <somemachine>  [same problem locally though]
 3) Run dialog or sysinstall or something like that.
 4) press cursor up to get my last command (zsh thing)
 5) Find that my terminal is printing 'A' instead of giving me my
    previous command.
 6) type reset and then re-reverse my xterm colours.
 
 I suppose this could be a problem with X11R6 as I think that might be
 where some new keypad/arrow things got glued on.
 
 I thought it could be a termcap thing, so before and after I tried this:
 
 set > ~/shell.settings.before
 [run sysinstall or similar program]
 set > ~/shell.settings.after
 
 There's no difference in what zsh thinks about my terminal ( wether zsh
 keeps an accurate record of what the terminal state is or is supposed to
 be I don't know, so this could be unimportant)
 
 Anyway, I find I'm using C-a C-p C-r (standard emacs keys) in zsh and they
 seem to work fine even after using any dialog box thing.
 
 So I figure it could be a termcap problem where termcap doesn't know about
 the R6ism's with KP_Prior, KP_Next, KP_Up, KP_Down, KP_Left, KP_Right.
 
 [Actually I think these are keypad only ones, but they may have made
 changes to normal cursor key operation as well ?]
 
 My X keyboard is set up as :
 Section "Keyboard"
    Protocol        "Standard"
    XkbRules        "xfree86"
    XkbModel        "pc102"
    XkbLayout       "gb"
 EndSection
 
 I use xmodmap when I start up: (which shouldn't affect this)
 
 +              "I" Exec xmodmap -e "keycode 49 = grave bar backslash"
 
 [ripped out of my .fvwm2rc file. (Best Window Manager by far =) ]
 
 I'm guessing that this might actually be that I don't have the proper
 termcap entries for xterm. BUT, xterms work fine to start with, which
 implies more to me that libdialog and related programs don't reset the
 terminal state properly.
 
 That however leads to me concluding that it's either termcap entries
 missing or just a problem with termcap. (probably wrongly concluded)
 
 I really don't have much more information than that. (although I can give
 a login account if you want to see it happen for yourself!)
 
 	Steve
 
 --
 Steve Roome - Vision Interactive Ltd.
 Tel:+44(0)117 9730597 Home:+44(0)976 241342
 WWW: http://dylan.visint.co.uk/
 

From: John Polstra <jdp@polstra.com>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc: jkh@FreeBSD.ORG, steve@visint.co.uk
Subject: Re: gnu/5039: libdialog fails to resore terminal
Date: Fri, 14 Nov 1997 07:43:06 -0800

 >  >      dialog --infobox "Go reset your terminal" 3 35
 >  
 >  This seems to work just fine for me.  Can you be more explicit about
 >  which terminal parameters are being left hosed?
 
 Try it on an X11R6 xterm using the X11R6 termcap entry which includes
 the color capabilities.  It leaves the colors set at black on black,
 which can be kind of hard to read. ;-)
 
 Hmm, I see that I've removed the annoying "ti" and "te" entries from
 my termcap entry.  That might be a contributing factor.
 
 John P.

From: Stephen Roome <steve@visint.co.uk>
To: John Polstra <jdp@polstra.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, jkh@FreeBSD.ORG
Subject: Re: gnu/5039: libdialog fails to resore terminal
Date: Fri, 14 Nov 1997 17:39:51 +0000 (GMT)

 On Fri, 14 Nov 1997, John Polstra wrote:
 
 > >  >      dialog --infobox "Go reset your terminal" 3 35
 > >  
 > >  This seems to work just fine for me.  Can you be more explicit about
 > >  which terminal parameters are being left hosed?
 > 
 > Try it on an X11R6 xterm using the X11R6 termcap entry which includes
 > the color capabilities.  It leaves the colors set at black on black,
 > which can be kind of hard to read. ;-)
 
 I forgot to mention that I'm not using the R6 termcap xterm entries
 supplied by XFree because they don't work properly, whereas the normal
 ones do for everything else.
 
 It's worth noting I suppose that I didn't need to change anything for rxvt
 and termcap.
 
 Maybe if I use the termcap stuff supplied by Xfree then I'll not have this
 particular problem but I can have all the others it gives you.
 
 	Steve
 
 --
 Steve Roome - Vision Interactive Ltd.
 Tel:+44(0)117 9730597 Home:+44(0)976 241342
 WWW: http://dylan.visint.co.uk/
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: steve@visint.co.uk
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: gnu/5039: libdialog fails to resore terminal 
Date: Thu, 18 Nov 1999 12:39:08 +0200

 On Fri, 14 Nov 1997 12:23:23 GMT, steve@visint.co.uk wrote:
 
 >  Maybe if I use the termcap stuff supplied by Xfree then I'll not have
 >  this particular problem but I can have all the others it gives you.
 
 I use a vanilla XFree86 3.3.5 xterm with no hanky panky in termcap.  The
 command ``dialog --infobox "Go reset your terminal" 3 35'' produces a
 box in the middle of my xterm, and returns me to the command prompt at
 the very bottom of the xterm.
 
 There are no unpleasant side-effects, unless you don't like the fact
 that whatever was in your xterm before is now gone.  Whether you regard
 that as an unpleasant side-effect is pretty much a matter of personal
 taste.
 
 Unless someone can show that the default termcap entry for xterm or the
 XFree86 3.3.5 xterm produces some _other_ side-effects some time soon,
 I'll close this PR.
 
 Ciao,
 Sheldon.
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Thu Dec 9 01:59:31 PST 1999 
State-Changed-Why:  
Closed as forewarned. 
>Unformatted:

