Red Hat Bugzilla – Full Text Bug Listing
|Summary:||[RFE-privacy] clear the console|
|Product:||[Fedora] Fedora||Reporter:||Account closed by user <c719711>|
|Component:||ncurses||Assignee:||Miroslav Lichvar <mlichvar>|
|Status:||CLOSED ERRATA||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||rawhide||CC:||dickey, maxamillion, mlichvar, rrakus|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2013-01-30 08:44:29 EST||Type:||Bug|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Account closed by user 2012-04-24 10:12:50 EDT
clear_console: New helper program to clear the *console*, including the _scrollback buffer_. DESCRIPTION clear_console clears your console if this is possible. It looks in the environment for the terminal type and then in the terminfo database to figure out how to clear the screen. To clear the buffer, it then changes the foreground virtual terminal to another terminal and then back to the original terminal. src in debian_bash: http://packages.qa.debian.org/b/bash.html
Comment 1 Roman Rakus 2012-04-24 12:10:03 EDT
Thanks for informations. I don't like debian all-in-one patch style. Is clear_console somewhere alone?
Comment 3 Account closed by user 2012-04-24 12:40:36 EDT
Created attachment 579915 [details] man page
Comment 4 Account closed by user 2012-04-24 12:47:25 EDT
source: http://archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_4.2-2ubuntu2.diff.gz or: http://ftp.de.debian.org/debian/pool/main/b/bash/bash_4.2-2.diff.gz $ gzip -cd bash_xxx.diff.gz | patch -p1 -f
Comment 5 Account closed by user 2012-04-24 12:51:37 EDT
Created attachment 579920 [details] bash_logout
Comment 6 Account closed by user 2012-04-24 13:21:11 EDT
I think util-linux is a much better place for clear_console.
Comment 7 Roman Rakus 2012-04-24 13:48:33 EDT
I don't think changing bash logout is good idea. There is clear binary and it is in ncurses package, so ncurses seems to be the most suitable to contain clear_console for me. Let's see what is the opinion of ncurses maintainer.
Comment 8 Miroslav Lichvar 2012-04-25 09:25:07 EDT
Recent kernels support a command to clear the scrollbuffer directly, without need to switch to another console and back. You can do that by 'tput E3' in shell. I'm not sure this is worth creating a new binary just for that. Let's ask the upstream maintainer.
Comment 9 Thomas E. Dickey 2012-04-25 17:11:58 EDT
There was some discussion of clear_console before, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=376841 I don't know why there was no followup, but that's a place to start.
Comment 10 Miroslav Lichvar 2012-10-15 09:51:45 EDT
Thomas, do you think it would be acceptable to include in ncurses a script which simply calls "tput E3; clear" or do you prefer a C implementation?
Comment 11 Account closed by user 2013-01-04 09:19:44 EST
Comment 12 Thomas E. Dickey 2013-01-06 17:54:17 EST
hmm - I replied via email 2012/10/15, but the reply didn't get here. What I said then: I'm not sure what's needed: it's a one-liner if E3 exists and a regular "clear" if not. My point then that was that for a one-liner, and relatively small use, I'm not sure why it's especially useful in ncurses (perhaps starting by a patch to the package in Fedora would be the best way to proceed).
Comment 13 Miroslav Lichvar 2013-01-30 08:44:29 EST
Instead of adding a new program, I've modified the clear(1) program to clear also the scrollback buffer if the E3 capability is present. This is in ncurses-5.9-8.20130126.fc19.
Comment 14 Fedora Update System 2013-04-15 08:46:21 EDT
ncurses-5.9-10.20130413.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/ncurses-5.9-10.20130413.fc18
Comment 15 Fedora Update System 2013-04-15 09:03:44 EDT
ncurses-5.9-10.20130413.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/ncurses-5.9-10.20130413.fc17
Comment 16 Fedora Update System 2013-04-30 23:27:15 EDT
ncurses-5.9-10.20130413.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2013-04-30 23:33:57 EDT
ncurses-5.9-10.20130413.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.