[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Clear screan question



Of all the days, it was on Sun, Jan 28, 2001 at 09:00:07AM -0600 that wes schreiner quoth:
> "Sander Smeenk (CistroN Medewerker)" wrote:
> > 
> > Quoting wes schreiner (wes@infosink.com):
> > 
> > > Not that I can see, though I'd love to know of a clean way to clear the
> > > scroll-back buffer.  I agree it's a bit hackish.  Can anyone come up
> > > with something better?
> > 
> > Ehm.. I did this:
> > 
> > knopje# echo -e "\033[2J\033[1;1H" > issue.new
> > knopje# cat /etc/issue >> issue.new
> > knopje# mv issue.new /etc/issue
> > 
> > And now when i log out from consoles the screen clears and the scrollback
> > buffer is empty.. The \0332J is ANSI for Clear Screen and \033[1;1H is ANSI
> > for place cursor on x1 y1...
> > 
> > Works for me...
> 
> Tried it, but this only clears the immediately visible screen for me,
> not the scroll-back buffer.  I'm using mgetty, are you using mingetty or
> some other *getty?  Maybe that's the difference.  If so, then Ethan's vt
> switching method is better because it doesn't depend on the getty.
> 

These ANSI codes do only clear the screen when the user logs out,
which was the original question.  At some point somebody interpreted it
to be about clearing the scrollback buffer, and things have been going
off on that tangent ever since.  FWIW, I posted these ANSI codes about
two days ago and also noted that they don't work at all if you don't
have an ANSI terminal.



Reply to: