LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

Reply
 
Search this Thread
Old 04-09-2012, 09:34 PM   #1
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 444

Rep: Reputation: 19
Where is screen cleared before initial login prompt?


In the past the screen has not been cleared before displaying /etc/issue and the initial login prompt. I like that because sometimes errors and warnings are displayed that do not appear in any logfile.

Recently one of my 2 machines (probably the one I changed to baselayout 2) has started clearing the screen. Not good.

What do I need to change to prevent clearing?

Thanks
Jim
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-09-2012, 09:44 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 207Reputation: 207Reputation: 207
On my system, ~/.bash_logout calls clear_console:

Code:
# ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy

if [ "$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
So I could comment out those lines, if I wanted:

Code:
# ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy

#if [ "$SHLVL" = 1 ]; then
#    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
#fi
You can edit /etc/skel/.bash_logout if you want to change the behavior for all new accounts, as well.
 
Old 04-09-2012, 10:28 PM   #3
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 444

Original Poster
Rep: Reputation: 19
How is something in ~/.bash_logout relevant? No-one is logged in yet, so which one to use? I'm talking about clearing the screen before the *initial* login prompt is displayed.
 
Old 05-01-2012, 01:09 PM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by CollieJim View Post
In the past the screen has not been cleared before displaying /etc/issue and the initial login prompt. I like that because sometimes errors and warnings are displayed that do not appear in any logfile.

Recently one of my 2 machines (probably the one I changed to baselayout 2) has started clearing the screen. Not good.

What do I need to change to prevent clearing?

Thanks
Jim
This is the new default behavior in agetty. You can add --noclear in TERMINALS
section of /etc/inittab to avoid it.
Here's how that section should look to get the old behavior of not clearing:
Code:
# TERMINALS
c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux
It was in the post install message of sys-apps/util-linux-2.20.1-r1 - 02/27/2012
Code:
LOG: postinst                                                                                                                                                                                                                  │
│The agetty util now clears the terminal by default.  You                                                                                                                                                                       │
│might want to add --noclear to your /etc/inittab lines.
Hope that gets you all fixed up.
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to inhibit the clear screen before login prompt Larry James Fedora 4 08-21-2010 08:54 PM
X resolution at initial login screen billgatos Slackware 1 08-30-2004 02:30 AM
When i login, there is a command prompt at the top of the screen bcf2 Linux - Newbie 12 07-09-2004 12:05 AM
Mandrake 9.1: No login prompt. Just a blue screen khurrum Mandriva 1 05-18-2004 10:19 PM
initial login screen Tbassett Slackware 4 10-09-2003 05:43 PM


All times are GMT -5. The time now is 11:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration