Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!ux1.cso.uiuc.edu!phil From: phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) Newsgroups: comp.windows.x Subject: Re: xterm -- how can I disable screen restore? Message-ID: <1991Apr9.190153.10762@ux1.cso.uiuc.edu> Date: 9 Apr 91 19:01:53 GMT References: <736@necssd.NEC.COM> <6315@awdprime.UUCP> Organization: University of Illinois at Urbana Lines: 45 sanders@peyote.cactus.org (Tony Sanders) writes: >It's not xterm doing it. It's vi/less/etc looking at your >termcap/terminfo doing it. You'll have to modify your termcap/terminfo to >remove the offending escape sequences. > terminfo: smcup/rmcup > termcap: ti/te These escape sequences are in the termcap as initializers for doing curses or other screen cursor addressing. For a VT100 they are not necessary as this can be done at any time. It switches to an alternate screen. There are SOME cases where I do NOT want this switch and there are SOME cases where I *DO* want this switch. Removing the termcap entry will remove it from call cases. I am lucky that essentially my terminal use is VT100 so what I have done is hack LESS to just not do the calls to generate those sequences. This will break if some terminal type needs them (hopefully rare). The termcaps just do NOT distiguish "sequences to initialize cursor addressing" (which should be NULL on a VT100) and "sequences to switch to and from alternate screens" which should be specified for a VT100 and user selectable on a program by program basis to act upon or not ( -altscreen ). >The escape sequences for the X11R4 xterm is "ESC [ ? 47 h" and "ESC [ ? 47 l" >To turn it off simply remove the entry. I like to make my smcup >switch screens then clear the screen, something like: > smcup=\E[?47h\E[H\E[2J >BTW: You should feel lucky, some people try for a long time to get those >to work. All you have to do is make it stop. :-) I guess their work goes unappreciated? :-) >If you decide you like them, I suggest having a little script that >echo's the escape sequence to swicth you back and forth. Then you have >a "virtual screen" to save data on while you type in the other one. >Not very useful with X-windows, but If you're ever stuck on an ascii >terminal it has it's place. Sounds like a useful idea! -- /***************************************************************************\ / Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu \ \ Lietuva laisva -- Brivu Latviju -- Eesti vabaks / \***************************************************************************/