How do I increase the scrollback buffer in a running screen session?

前端 未结 6 630
没有蜡笔的小新
没有蜡笔的小新 2020-12-12 08:58

Lets say I have a currently running screen session I am interacting with through putty. I\'ve realized that the scrollback buffer is too small and would like to increase it

6条回答
  •  Happy的楠姐
    2020-12-12 09:31

    As Already mentioned we have two ways!

     Per screen (session) interactive setting

    And it's done interactively! And take effect immediately!

    CTRL + A followed by : And we type scrollback 1000000 And hit ENTER

    You detach from the screen and come back! It will be always the same.

    You open another new screen! And the value is reset again to default! So it's not a global setting!

     And the permanent default setting

    Which is done by adding defscrollback 1000000 to .screenrc (in home)

    defscrollback and not scrollback (def stand for default)

    What you need to know is if the file is not created ! You create it !

    > cd ~ && vim .screenrc
    

    And you add defscrollback 1000000 to it!

    Or in one command

    > echo "defscrollback 1000000" >> .screenrc
    

    (if not created already)

    Taking effect

    When you add the default to .screenrc! The already running screen at re-attach will not take effect! The .screenrc run at the screen creation! And it make sense! Just as with a normal console and shell launch!

    And all the new created screens will have the set value!

    Checking the screen effective buffer size

    To check type CTRL + A followed by i

    And The result will be as

    Importantly the buffer size is the number after the + sign
    (in the illustration i set it to 1 000 000)

    Note too that when you change it interactively! The effect is immediate and take over the default value!

    Scrolling

    CTRL+ A followed by ESC (to enter the copy mode).

    Then navigate with Up,Down or PgUp PgDown

    And ESC again to quit that mode.

    (Extra info: to copy hit ENTER to start selecting! Then ENTER again to copy! Simple and cool)

    Now the buffer is bigger!

    And that's sum it up for the important details!

提交回复
热议问题