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

Re: Clearing Screen on Logout?

On Tue, 2 Mar 2010 12:52:31 -0500 (EST), Carlos Williams 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). Normally
> in RHEL, Arch, Ubuntu, and most other distributions when a user logs
> out or exits from a shell, their history is not visible on the screen
> but in Debian, it is. Is there any way to change this? How can I exit
> a shell window in Debian and have it clear my scrolled up commands and
> actions to a blank login screen?

This is true only for the root user.  If you logout from a virtual
terminal as a normal user, the screen clears.  If you logout from
a virtual terminal as root, the screen does not clear.  That's because
root does not have the standard .bash_logout file.  It's easy to fix.
Just copy it from your non-superuser self.  For example, if your
normal user account is "carlos", then issue this command as root:

   cp /home/carlos/.bash_logout ~

I can't remember if it takes effect on the logout from this session,
but it will for sure on logout after the next login.

Reply to: