Bug 416940 - Scrollback limit in megabytes
Summary: Scrollback limit in megabytes
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: history (show other bugs)
Version: 19.08.0
Platform: Debian stable Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-30 09:47 UTC by Alexander Potashev
Modified: 2024-12-04 10:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
attachment-520800-0.html (1.50 KB, text/html)
2024-12-04 08:49 UTC, tcanabrava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2020-01-30 09:47:33 UTC
SUMMARY
I would like to set scrollback limit to a specific number of megabytes and store it in RAM.

The objective is to have a deep enough history stored in RAM, but still limit it to using a reasonable amount of RAM (e.g. up to 2 GB). For my use case I can't use Unlimited scrollback stored on disk for information security reasons.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
konsole Version 19.08.0
Comment 1 tcanabrava 2020-01-30 10:48:45 UTC
We have a patch for Konsole that encrypts the file in disk:
https://phabricator.kde.org/D16134

It's not landed, but maybe you can take a look on it to see if you feel it would be a good alternative for what you are describing?
Comment 2 Alexander Potashev 2020-04-04 16:34:54 UTC
(In reply to tcanabrava from comment #1)
> We have a patch for Konsole that encrypts the file in disk:
> https://phabricator.kde.org/D16134

Yes, this would be a perfect solution for my use case. Thanks!
Comment 3 Kurt Hindenburg 2020-07-11 19:12:16 UTC
I've abandoned that patch; it would better to use an OS encrypted folder/file/HD
Comment 4 Alexander Potashev 2020-08-15 21:52:27 UTC
(In reply to Kurt Hindenburg from comment #3)
> I've abandoned that patch; it would better to use an OS encrypted
> folder/file/HD

This would be less secure (than a random security key per Konsole tab) because a user typically has access to the encrypted files, therefore the Konsole scrollback can be recovered by an attacker in a case when the encryption key is revealed.
Comment 5 Alexander Potashev 2020-08-15 21:53:09 UTC
> random security key

I meant: random encryption [private] key
Comment 6 Alexander Potashev 2020-08-15 21:53:13 UTC
> random security key

I meant: random encryption [private] key
Comment 7 Kurt Hindenburg 2024-03-24 01:04:33 UTC
I would agree that perhaps instead of lines, the user could specify MBs.  However, I'm sure if that's possible or how complex that would be.
Comment 8 mythsmith 2024-12-04 07:48:07 UTC
Limit in megabytes is essential to avoid consuming all available disk space. It occurred to me few times during long monitoring sessions where a program started to produce an enormous amount of error logging, filled the disk and the OS crashed.
There should not exist any such thing as an "unlimited" file logging.
Comment 9 tcanabrava 2024-12-04 08:49:01 UTC
Created attachment 176339 [details]
attachment-520800-0.html

This is a nice idea .

On Wed, Dec 4, 2024 at 8:48 AM mythsmith <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=416940
>
> mythsmith <dp@mythsmith.it> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |dp@mythsmith.it
>
> --- Comment #8 from mythsmith <dp@mythsmith.it> ---
> Limit in megabytes is essential to avoid consuming all available disk
> space. It
> occurred to me few times during long monitoring sessions where a program
> started to produce an enormous amount of error logging, filled the disk
> and the
> OS crashed.
> There should not exist any such thing as an "unlimited" file logging.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 10 mythsmith 2024-12-04 10:13:18 UTC
I would add, history file should always start rolling (or rotating) whenever free space on target dir drops below a threshold (with a hard lower limit of 1MB or so).