Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the size of the scrollback buffer in GNU screen

Tags:

gnu-screen

How do I increase the number of lines that I can view in screen?

I want to view the lines from the point when I ran screen -S <screen_name> to the current operation. For example, how would I increase the buffer length to around 50000 lines?

I have already tried ^a :scrollback <number> but it does not increases the lines I can reach in my current terminal.

like image 659
Austin Philip D'silva Avatar asked Jun 17 '13 09:06

Austin Philip D'silva


People also ask

How do I increase the scrollback buffer in PuTTY?

Launch Solar-PuTTy > Menu (3-dots) > Settings > General > Launch PuTTy > Category (Left Pane) > Window , Set "Lines of scrollback".

How do I increase terminal buffer size in Ubuntu?

If you are using the standard Terminal program on a Desktop version of Ubuntu... Choose Edit -> Profile Preferences from the terminal windows global menu. Set Scrollback to the desired number of lines (or check the Unlimited box).


1 Answers

You cannot retroactively increase the scrollback buffer length in the current session in order to recover old lines that have already been discarded. However, if you change the current scrollback parameter setting (C-a :scrollback <number>), it will add more space for future terminal output. You can also set the defscrollback parameter to affect the initial scrollback setting for new windows.

If you want to set the default for all windows of all new screen sessions, make a ~/.screenrc file with

defscrollback 50000

or, if you only want a big scrollback sometimes, put it in a separate file, like ~/screenrc-50k-scrollback and invoke screen like this:

screen -S <screen_name> -c ~/screenrc-50k-scrollback

Check the current scrollback buffer capacity with C-a i (the info command).

(22,1)/(25,40)+50000 +flow G0[BBBB] 0(bash)
               ^^^^^

Reference: GNU Screen manual, Scrollback section

like image 120
neirbowj Avatar answered Jun 10 '23 13:06

neirbowj