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

RE: Clearing Screen on Logout?




> -----Original Message-----
> From: ludovico van [mailto:ludovicovan80@gmail.com] 
> Sent: Tuesday, 02 March, 2010 09:00
> To: debian-user@lists.debian.org
> Subject: Re: Clearing Screen on Logout?
> 
> On Tue, Mar 2, 2010 at 6:52 PM, Carlos Williams 
> <carloswill@gmail.com> wrote:
> > I noticed that with Debian when I logout of my system, it doesn't
> > clear the screen to the login screen via bash only (non GUI).
> 
> i have this in $HOME/.bash_logout :
> # ~/.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
> 
> however a simple "clear" should be enough
> 
> bye
> 

Another way of doing that is:

  mv /etc/issue /etc/issue.original
  clear > /etc/issue
  cat /etc/issue.original >> /etc/issue

Then the console will clear when /etc/issue is read.

Although I do not usually change my shell so while I think it is a bit more portable if you use something like csh, etc. I am not absolutely positive.

James

Reply to: