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

Re: How to clear screen before login prompt



Joseph Carter said
> On Tue, Jun 30, 1998 at 09:57:41PM -0500, the lone gunman wrote:
> > > I was trying to do a clear screen after I logout from the console before the login 
> > > prompt appears.
> > > 
> > > Any idea how this can be done? I tried some escape sequence but doesn't 
> > > work.
> > > 
> > > TIA.
> > 
> Here's my /etc/issue file with escapes converted to <'s..
> 
> ---8<--------
> <[H<[J
> 
> Debian GNU/\s (slink) \m kernel \r  <[34;1m\l<[0m
> 
> ---8<--------
> 
> This results in a very clean...
> 
> ----[TOP]----
> 
> Debian GNU/Linux (slink) i486 kernel 2.1.105  tty2
> 
> icarus2 login: _
> -------------
> 
> with ttyX standing out in a nice bright blue color..

There's a lot you can do with the console and escape sequences.
I've played around with it a bit and have come-up with a full-screen
version that uses all of the variables supported by issue (\b, \d, \t, etc)
as well as line-draw characters and color.  I've included it here in case
any one cares to see it. 

Note1:	I 've substituted "%" for real escapes.
Note2:  I've had to change the default console font to Cyr_a8x16 for the
	line draw characters to "work".
Note3:	The Copyright notice isn't even seen since the display is cleared
	almost imediately after.
Note4:	I'd guess this would be enough to severly dork some terminal types
	so I only use this on the console.  (Most of the systems I setup 
	only have a getty on tty1...)
Note5:	Pressing <ENTER> without a user name updates the time and user count
	fields.
Note6:	The /d variable returns a variable-length result, therefore one line
	is a character "short" 9 days per month. (1st through the 9th)  Looks
	great after that!


---8<--------

Copyright 1998 Charles A. Stickelman <stick@practical.net>
This file is covered by version 2 (or any later version) of the GPL.
%[31;40;1m%[8]%[H%[JÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º%[37;1m                   %[32m%[5mWELCOME%[0m%[1m%[37m to %[36mDebian GNU/\s Release%[37m: %[33m2.0%[37m.                  %[0mº
ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
º%[37;1m  Brought to you by:                                                          %[0mº
ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ
º%[36;1m  Software In The Public Interest     %[0m³%[36;1m  Free Software Foundation             %[0mº
º%[37;1m  P.O. Box 70152                      %[0m³%[37;1m  59 Temple Place - Suite 330          %[0mº
º%[37;1m  Pt. Richmond, CA 94807-0152 USA     %[0m³%[37;1m  Boston, MA 02111-1307 USA            %[0mº
º%[37;1m                                      %[0m³%[37;1m  +1-617-542-5942                      %[0mº
ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ
º%[36;1m  Open Software Developers Worldwide  %[0m³%[36;1m  Practical Network Design             %[0mº
º%[37;1m  The world owes a giant "Thank You!" %[0m³%[37;1m  9 Chambers Road                      %[0mº
º%[37;1m  to Linus Torvalds et. al. for their %[0m³%[37;1m  Mansfield, OH 44906-1301 USA         %[0mº
º%[37;1m  HUGE investment of time and energy! %[0m³%[37;1m  +1-419-529-3841                      %[0mº
ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
º%[37;1m  System Information:                                                         %[0mº
º%[36;1m  \s Kernel Version%[37m:%[33m \r%[37m-%[33m\m                                           %[0mº
º%[36;1m  Build Info%[37m:%[33m \v                                 %[0mº
ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ
º%[36;1m  System Name%[37m:%[33m \n                 %[0m³%[36;1m  Terminal%[37;1m:%[33m \l                       %[0mº
º%[36;1m  Domain Name%[37m:%[33m \o          %[0m³%[36;1m  Line Speed%[37m:%[33m \b                    %[0mº
ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ
º%[36;1m  Date/Time%[37m:%[33m \d \t%[0m³%[1m%[37m%[36;1m  Current Users%[37m:%[33m \u                     %[0mº
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ%[37;1m%[8]

---8<--------

stick

-- 
Chuck Stickelman, Owner			E-Mail:	<stick@richnet.net>
Practical Network Design		Voice:	+1-419-529-3841
9 Chambers Road				FAX:	+1-419-529-3625
Mansfield, OH 44906-1301 USA


--  
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: