Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto clear scrollback buffer on logout (local terminal)?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Mike81
n00b
n00b


Joined: 05 Jan 2011
Posts: 36

PostPosted: Wed Jan 08, 2014 2:22 am    Post subject: Howto clear scrollback buffer on logout (local terminal)? Reply with quote

Hi,

a local system, no X, no SSH. I am logging in (i.e terminal, tty1). I am doing something ("ls -l /etc"). When I now logout (I type "exit") I want to clear all the previous output, including the scrollback buffer (the next person who will sit in front of the machine shouldn't be able to press SHIFT+PgUp to see my previous output, in this example the output from "ls").

Well, I have ".bash_logout" which will call "clear". But this won't clear the scrollback buffer. E.g. the next person who sit in front of the machine can press SHIFT+PgUp and would see my last output.

Code:
echo -e "\e[3J"
also doesn't help.

The only thing which would help is switching the terminal, e.g. pressing ALT+2... when I now switch back to tty1 (ALT+1) the buffer seems to cleared (SHIFT+PgUp doesn't work anymore).

Is there a way to do that automatically on each logout, e.g. via ".bash_logout"?

PS: I have set CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 in my kernel.
Back to top
View user's profile Send private message
javeree
Apprentice
Apprentice


Joined: 29 Jan 2006
Posts: 278

PostPosted: Wed Jan 08, 2014 11:14 am    Post subject: Reply with quote

does 'reset' instead of 'clear' do something useful ?
Back to top
View user's profile Send private message
Mike81
n00b
n00b


Joined: 05 Jan 2011
Posts: 36

PostPosted: Wed Jan 08, 2014 2:52 pm    Post subject: Reply with quote

No, no different when using "reset" instead of "clear". I am still able to view the scrollback buffer using SHIFT+PgUp...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum