This question is similar to How to increase default xterm buffer size. I'd like to change my xterm buffer size (the buffer being how much I can scroll back) to unlimited on OpenBSD 5.7.

The other questions (and similar questions) state to use -sl XXX, where XXX is a size like 1000. But I want unlimited, and not a fixed size. I also want to ensure the history is only available for the session, and its not persisted like a command history. Finally, this is OpenBSD, and I dont have ~/.Xresources.


xterm's scrollback is limited because it allocates an array once(actually a FIFO) to keep track of the scrolled lines. Doing this once is much faster than periodically reallocating.

You could set the scrollback limit to a very large number (even a million), which is probably long enough for practical purposes. There is no such thing as "unlimited" when the data is stored in memory, in any case.

Before a rewrite in 2009, the practical limit for scrollback was on the order of 10,000 lines due to the way it updated the buffer. Now, it is essentially dependent upon how much memory you choose to use (with the caveat that resizing a window with a million lines of scrollback may be slow).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.