1

I'm experiencing some strange console pagination behaviour in tmux when SSH'd to a Ubuntu host (EC2 instance on AWS). I've demonstrated this behaviour by running irssi inside the tmux and hitting PgUp and PgDn.

(I'm aware that normally one should hit Ctrl+B and then PgUp to go up through buffer pages in tmux, but this should work in irssi as it's a terminal application that takes over the buffer and the paging.)

strange console pagination behaviour

You can see that it seems to think the window/buffer is about half of its actual size and move it to the top or bottom of the actual space, if that makes sense.

My $TERM is xterm-256color, $SHELL is /bin/bash, tty is /dev/pts/2 (for the moment at least, the pts number changes I think).

tmux -V is now 2.3 as I've tried installing the latest master from source, I first experienced this behaviour with the tmux that is packaged in the regular Ubuntu repositories (which was version 2.1). My Ubuntu is 16.04.1 LTS.

4
  • What do stty size and echo $LINES $COLUMNS print in your shell (before starting up irssi)? Do those numbers match the actual window size? Try these both before and after starting tmux.
    – egmont
    Sep 5, 2016 at 8:50
  • @egmont Yes it's 55 191 before starting tmux and then 54 191 after starting tmux (presumably due to the status bar line at the bottom)
    – tomatopeel
    Sep 5, 2016 at 9:01
  • 1
    Don't you need TERM=screen inside tmux?
    – meuh
    Sep 5, 2016 at 12:41
  • If you do that, your colors may not work (e.g., only 16 colors). tmux would work with screen-256color about as well as your non-tmux xterm-256color. Sep 5, 2016 at 17:29

2 Answers 2

1

For what it's worth, tmux relies upon using the terminal capabilities in the screen terminal description. Besides function-keys (which tmux does in a different way), here are a few of the differences which affect cursor movement (all features in xterm but not in screen), which you could see using infocmp xterm-256color screen:

    hpa: '\E[%i%p1%dG', NULL.
    indn: '\E[%p1%dS', NULL.
    rin: '\E[%p1%dT', NULL.
    vpa: '\E[%i%p1%dd', NULL.

If you set TERM=screen, that tells most applications to use only the number of colors described therein (8). tmux would work with screen-256color about as well as your non-tmux xterm-256color

There also are tmux and tmux-256color entries, but it is common for packagers to provide by default only a cut-down terminal database without these. You might want to install the ncurses-term package as a start.

0

As meuh commented, TERM=screen was needed when in a tmux session.

1
  • Can you edit this answer please, so you can earn reputation for answering your own question? I'll leave this for now.
    – eyoung100
    Sep 5, 2016 at 20:50

You must log in to answer this question.

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