RE: Clearing Screen on Logout?
> -----Original Message-----
> From: ludovico van [mailto:firstname.lastname@example.org]
> Sent: Tuesday, 02 March, 2010 09:00
> To: email@example.com
> Subject: Re: Clearing Screen on Logout?
> On Tue, Mar 2, 2010 at 6:52 PM, Carlos Williams
> <firstname.lastname@example.org> 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
> however a simple "clear" should be enough
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.