13

I have an ubuntu slice at slicehost, which means it is a DomU on a Xen host - and it's a pretty stripped down installation.

The thing that bugs me is that scrolling back in the terminal using shift-pgup doesn't work.

Can anybody tell me what package enables this scrollback functionality (so I can check if it is installed) - or if you have any other insights into why it might not be working, let me know.

(note: I am currently running screen with "defscrollback 1024" set, but it still doesn't work)

4 Answers 4

13

Add this to ~/.screenrc log out of screen and back in:

shell "/usr/bin/bash"
termcapinfo xterm* ti@:te@
2
  • 1
    The second line was all needed. (I am using zsh)
    – OverCoder
    Sep 21, 2018 at 14:47
  • Same. The 2nd line is all that's needed. Can you explain what this does and why it works? May 9, 2021 at 11:38
6

Screen disables the standard scrollback in your local X terminal, because it is actually a curses program behind the scenes. As Murali said, if you want to use screen's scrollback, you'll need to Ctrl-A esc and then use the regular keys (PgUp/PgDn/cursor) to look through the history. Escape will get you back out.

4
  • Hmmm. This is NOT the case on other (Debian) servers that I am running screen on. I can still use shift-pgup to scroll back on those servers.
    – Brent
    Jun 15, 2009 at 19:50
  • 1
    Vi key bindings (hjkl, Ctrl+F, Ctrl+B, / for search etc) will also work in screen's scrollback. Jun 15, 2009 at 19:50
  • Oh - also, this is NOT an "X terminal" - it is an ssh session.
    – Brent
    Jun 15, 2009 at 19:52
  • And what is your SSH session running in, perchance?
    – womble
    Jun 15, 2009 at 22:20
1

Is the screen session on your local or remote machine? If it's on the remote, then try going into screen's scroll back mode (Ctrl+A, [ by default).

Does Shift+PgUp work, out of interest?

3
  • My mistake - I meant shift-pgup (not ctrl-pgup).
    – Brent
    Jun 15, 2009 at 19:46
  • +1 Ctrl-A [ does give me scrollback functionality (although not the same as I am used to.)
    – Brent
    Jun 15, 2009 at 19:47
  • Screen's scrollback also allows you to copy and paste between mutliple screen windows. Ctrl-A [ puts you into copy mode; hit space once to set you first mark, space again for the second mark. Then Ctrl-A ] will paste the contents of the buffer into the window you're currently in. Jun 15, 2009 at 19:49
0

If you use PuTTY as your terminal, with a screen session running on the server, you must check the box next to "Disable switching to alternate terminal screen" in PuTTY Configuration Terminal->Features. The scroll-back then works as usual.

1
  • I am using gnome-terminal, not PuTTY - but thanks.
    – Brent
    Oct 9, 2009 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .