Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!romp!auschs!awdprime!sanders.austin.ibm.com!sanders From: sanders@peyote.cactus.org (Tony Sanders) Newsgroups: comp.windows.x Subject: Re: xterm -- how can I disable screen restore? Summary: terminfo:smcup/rmcup termcap:ti/te Message-ID: <6315@awdprime.UUCP> Date: 1 Apr 91 21:46:49 GMT References: <736@necssd.NEC.COM> Sender: news@awdprime.UUCP Reply-To: Tony Sanders Organization: IBM AWD, Austin Lines: 29 Originator: sanders@sanders.austin.ibm.com In article <736@necssd.NEC.COM> harrison@necssd.NEC.COM (Mark Harrison) writes: >How can I make xterm not restore the previous screen when exiting >from applications such as vi and less? I have rtfm and the faq, >but can't find a clue. 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 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. :-) 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. later, -- sanders@peyote.cactus.org Brilliance is typically the act of an individual, but incredible stupidity can usually be traced to an organization. -- "More Programming Perls", Jon Bentley I am not an IBM representative, I speak only for myself.