Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th May 2008
vermaden's Avatar
vermaden vermaden is offline
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,053
Default HOWTO: Clear console screen after logout

I have tried to put clear at shells logout scripts: /etc/{zlogout,csh.logout} etc, also changing /etc/gettytab from:

P|Pc|Pc console:\

P|Pc|Pc console:\
does not prevent user from hitting Scroll Lock key and scrolling terminal history with Page {Up,Down}.

At this moment the only trully working sollution to this I have found is to put:

vidcontrol -C && clear
to all logout scripts of shells.


vidcontrol -C && clear does this very well, but like I said I am looking for some PURE/PROPER sollution for this.

Originally Posted by ephemera
I don't think there's any other solution but ofcourse you could modify the getty source code to empty the sc scroll back buffer every time its run and recompile it

Thank You for another sollution, but I think that I will stay with vidcontrol -C && clear for one reason: why touch two files while I can touch only one.


EDIT0: I think that I will use Your method because sh and ksh shells does not support any *logout files.

EDIT1: sollution to not use /etc/gettytab:
sh and ksh both use /etc/profile as a main startup file but as I mentioned before they does not support *logout files, the sollution is to put this command into /etc/profile:
trap "vidcontrol -C && clear" 0
so vidcontrol -C && clear will be executed at logout.
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd

Last edited by Carpetsmoker; 7th May 2008 at 05:47 AM. Reason: Fix title
Reply With Quote

clear, logout, vidcontrol

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: system load status in screen(1) vermaden Guides 9 29th March 2010 08:07 PM
log in to console and startx in os x questionguy Other BSD and UNIX/UNIX-like 11 25th August 2009 05:27 AM
Console Resolution Problem kienjakenobi FreeBSD General 19 12th September 2008 12:20 PM
Console Fonts JMJ_coder General software and network 6 10th September 2008 09:57 PM

All times are GMT. The time now is 08:03 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick