GNOME Bugzilla – Bug 746625
clear(1) doesn't work as expected
Last modified: 2015-03-23 16:34:59 UTC
Hi. Please redirect to VTE, if it's an issue there :-) clear(1) is documented to: >clears your screen if this is possible, including its scrollback >buffer (if the extended "E3" capability is defined). clear looks in >the environment for the terminal type and then in the terminfo database >to determine how to clear the screen. This doesn't fully work, while it clears the screen, the scrollback buffer is not cleared (e.g. I can go up and see everything that was previously on the screen there). This issue seems to be *not* directly related to the fact the GNOME Terminal wrongly announces itself as TERM=xterm[-256color], cause if one manually sets TERM=gnome clear wouldn't work either. I've increased the severity to major, since this may be actually security relevant: People may e.g. want to have their screen cleared when they log out from remote SSH sessions or when they su'ed to some other user, because confident information might have been printed to the terminal during that session. With clear not working, this goal wouldn't be achieved. Interestingly, reset(1) does just that job. Cheers, Chris
In recent vte, clear(1) clears everything but the last page. This is because of bug 506438.
*** This bug has been marked as a duplicate of bug 506438 ***
Sorry, I didn't identify the other bug by it's title as what I was looking for :D Is that now planned to clear *everything* and not just except the last page? Imagine that the last page may very well just be: $ cat /etc/shadow or something worse ;-)