How do I scroll back inside a GNU Screen session?

0
2
Asked By MellowCactus47 On

Scrolling works normally in my terminal, but when I enter a GNU Screen session, pressing the usual scroll keys produces visible escape characters such as `^[[A` instead of moving through the terminal history. I tried Ctrl+A and Ctrl+PageUp without success. What is the correct way to scroll back while inside Screen?

3 Answers

Answered By QuietMaple8 On

Use Screen's copy mode to browse its scrollback buffer. Press Ctrl+A, then `[`. Once copy mode is active, use the arrow keys, Page Up, or Page Down to move around. Press `q` or Escape to leave copy mode.

MellowCactus47 -

That worked—Ctrl+A followed by `[` puts me into the scrollback mode I was looking for.

Answered By SilverPond26 On

The terminal emulator owns its normal scrollback, but Screen is a full-screen terminal multiplexer and maintains its own history. That is why regular terminal scrolling may not behave as expected inside the session. If the session is using an alternate screen buffer, you may need to configure Screen or the outer terminal to handle scrolling, but copy mode is the reliable built-in solution.

Answered By BrightHarbor19 On

If the session was interrupted and the terminal remains in the alternate screen buffer, normal scrolling can also appear broken. Usually this is fixed by cleanly exiting a full-screen program such as `less` or by resetting the terminal state. Do not send alternate-buffer escape sequences while you are actively inside Screen, since that can make the display state more confusing.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.