clear old output in login screen?

Frank Shute frank at shute.org.uk
Tue May 5 10:36:53 UTC 2009


On Tue, May 05, 2009 at 09:45:16AM +0100, Mike Clarke wrote:
>
> On Tuesday 05 May 2009, perryh at pluto.rain.com wrote:
> 
> > Mike Clarke <jmc-freebsd2 at milibyte.co.uk> wrote:
> > > On Monday 04 May 2009, perryh at pluto.rain.com wrote:
> >
> > ...
> >
> > > > ? #!/bin/csh
> > > > ? clear
> > > > ? vidcontrol -C
> > > > ? exec /usr/bin/login.real "$@"
> > >
> > > But this wouldn't prevent someone scrolling back with the scroll
> > > lock key before logging in. I assume the OP's requirement is to
> > > stop people from seeing previous users console activity.
> >
> > That's what the "vidcontrol -C" line is supposed to accomplish,
> > based on my reading of vidcontrol(1) and earlier messages in the
> > thread.  Granted I have not actually tried it.
> 
> Yes, "vidcontrol -C" will accomplish this, but my point was that 
> including this as part of the replacement login script is too late. You 
> don't need to be logged in to use the scroll lock and pg{Up,Dn} keys. 
> To prevent people seeing the previous users activity you would need to 
> clear the console buffer at the logout stage.
> 

I see what you mean.

Perhaps put vidcontrol -C in /etc/csh.logout

For other shells e.g ksh:

alias logout='~/.ksh_logout; exit'

(not tested)

It seems that for sh, logout is a builtin but it's not mentioned in
it's manpage.


Regards,

-- 

 Frank 


 Contact info: http://www.shute.org.uk/misc/contact.html 



More information about the freebsd-questions mailing list