Search code examples
ubuntuttytmux

tmux does not start when using tty (ubuntu 11.10)


I went through this similar question at https://stackoverflow.com/a/7410228/880040 and the 6th thing to check,

Make that your terminal capabilities file exists: ls -lh /usr/share/terminfo/*/$TERM

Is what doesn't pass. This entire folder is empty. tmux works as expected when starting it from a ssh session. On the tty session, it just hangs on a newline after the tmux command. Cannot kill it with ctrl-c either, have to ssh in and killall tmux.

$TERM is 'linux' OS is Ubuntu 11.10 (server edition) 32 bit

Unfortunately the above post did not explain what to do if /usr/share/terminfo was empty.


Solution

  • In Ubuntu, the various terminfo files are provided by ncurses-base1 - you might first want to try reinstalling to see if that fixes your issue.

    If that doesn't work, you can always copy the working terminfo (from the box you are SSH'ing from) across to your Ubuntu machine.

    First, establish that you do not have an entry for linux on the Ubuntu box:

    infocmp linux

    Then, on the machine that you SSH from, make a copy of the terminfo:

    infocmp linux > linux

    copy it to your remote machine with scp and then, on the remote machine, install it with:

    # tic /path/to/linux

    You should also consider installing screen-256color as this is the terminfo tmux works best with.


    1. http://packages.ubuntu.com/ko/natty/ncurses-base