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

Re: Clear screan question



[ Sune Kirkeby ]
> I don't know how or why, but it does _not_ clear the scroll-back
> buffer on my console, "chvt 63 ; reset -Q ; chvt 1" does though.

[ Ethan Benson ]
> you don't need the reset -Q there.  the simple act of changing VCs
> clears the scrollback history.

[ Sune Kirkeby ]
> Sorry, my bad for being unclear.  I meant that the above command would
> clear both the scroll-back buffer and the "actual" terminal itself.

[ Ethan Benson ]
> except your reset -Q happens on tty63, which alsmost certainly has
> nothing there you care about.

Just checked, and it most certainly resets the originating terminal
(i.e. the one you run the command-sequence from).  Try it with vt1 and
vt2 while logged in on vt1.

This also is what is to be expected, since the commands are run on the
terminal they are attached to, _not_ on the vt currently displayed
(think what a mess it would be if all programs run on all vts would
meddle around on the current vt.)

[ Ethan Benson ]
> you want to clear tty1 (or wherever you were logged in). `clear` is a
> sufficient way to do that rather then reset (which resets all kinds of
> things and is slower then clear) 

True.

-- 
Sune Kirkeby                    | Please forgive me if, in the heat of battle,
http://mel.interspace.dk/~sune/ | I sometimes forget which side I'm on.

Attachment: pgpp4K0NjGrxI.pgp
Description: PGP signature


Reply to: