From: Carlos Williams on
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?


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/d80f793f1003020952p1aa57001t53cefc1f14b58d53(a)mail.gmail.com
From: ludovico van on
On Tue, Mar 2, 2010 at 6:52 PM, Carlos Williams <carloswill(a)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


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/5eb330f91003021000t51554437rc98bd4542316aafe(a)mail.gmail.com
From: James Zuelow on


> -----Original Message-----
> From: ludovico van [mailto:ludovicovan80(a)gmail.com]
> Sent: Tuesday, 02 March, 2010 09:00
> To: debian-user(a)lists.debian.org
> Subject: Re: Clearing Screen on Logout?
>
> On Tue, Mar 2, 2010 at 6:52 PM, Carlos Williams
> <carloswill(a)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

--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4A09477D575C2C4B86497161427DD94C149F78859C(a)city-exchange07
From: Chris Jackson on
Carlos Williams wrote:

> I think having to type 'clear' before log out is crazy. Also if I have
> 1,000 users, thats a log of files to edit. Is there no global file
> config that will achieve this?


/etc/bash.logout

--
Chris Jackson
Shadowcat Systems Ltd.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4B8D542D.6010306(a)shadowcat.co.uk
From: Stephen Powell on
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.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/1408441073.16196761267552992905.JavaMail.root(a)md01.wow.synacor.com