term config prolem

Stephen Dowdy sdowdy at ucar.edu
Mon Jul 22 21:30:58 BST 2013


Gene Heskett wrote, On 07/22/2013 12:29 PM:

> For instance, I do software for a legacy machine, and need at least 100k 
> lines of history I can scroll back through looking for build errors.  With 
> a 1000 line default limit, 99% of a nitros9 build scrolls out of the buffer 
> forever.  I have 8Gb of ram, so there's little excuse for such a style 
> cramping limit.

IIRC, konsole uses memory upto a certain point for scrollback, but
uses /tmp file-on-disk after that. (definitely if you select "unlimited scroll".
(e.g. lsof shows:
    konsole 3877 dowdy   86u   REG              254,6   896364       80 /tmp/kde-dowdy/konsolecr3877.tmp
(about 20 or so such lines, probably one per TAB)
if i switch from 1,000 fixed lines to unlimited (no tmpfiles open before)

For every character, i think (IIRC) konsole used about 3 bytes of disk space (to hold
display attributes and the like)

For 1,000 lines at 80char/line that'd be about 1/4MB
for 100K lines that'd be about 25MB.  that's still not tremendous,
but if you have lots of terms and especially unlimited scrollback
and a small /tmp, you could run into trouble.

I've seen some users with unlimited scrolling taking minutes to
scroll back to the beginning if they failed to regularly logout.
(these are folks that stay logged in for months at a time :-( )

So, not sure if Konsole honors ${TMPDIR} or not, but i'm guessing that these
are opened referential to kde path "tmp"
    $ kde4-config --path tmp
    /tmp/kde-dowdy/


so, you might need to change kde4-config to point to SharedMem by setting
  KDETMP and/or TMPDIR   via something like:

    tmpfs_dir=${tmpfs_dir:-/dev/shm}
    TMPDIR=$(mktemp -d ${tmpfs_dir}/${USER}.$(date +%Y-%m-%d).XXXXXXXX) \
      || { echo "failed to make temp directory, aborting" ; exit 1 ;}
    readonly TMPDIR
    export TMPDIR
    export KDETMP="${TMPDIR}"

in a KDE Autostart directory script (or dotfile, or...)
prior to starting any konsole (multithreaded, so the first you start will
take precedent)

I'm just *this* far from replacing 'konsole' with a symlink to xfce Terminal,
(xfce4-terminal on Debian Wheezy)
which has many of the same features, but none of the misfeatures/bugs of konsole.
(at least that i've found yet)  (well, VTE, the engine xfce4-terminal uses does
use /tmp/vte* for scrollback buffering, even at 1,000 lines, or even 80, but
at least when you cut/paste, you get what you see, not a bunch of blanks at
the end of the line most of the time)

--stephen
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list