Unix screen utility error: Cannot find termcap entry for 'xterm-256color'

gnu-screen, macos, netbsd, ssh, termcap

Solution

Quick fix: run `TERM=xterm screen` instead of `screen`.

You get the error because on your mac you have `TERM=xterm-256color`, and xterm-256color is not in the remote machine's termcap. You don't get the error when you connect from the other computer because it has its TERM variable set to something else.

Problem

I work on a NetBSD system through an ssh connection from my Mac and I want to use the `screen` utility so that I can start processes and come back to them after my terminal connection has been interrupted. When I type `screen` I get the error message: ``` Cannot find termcap entry for 'xterm-256color' ``` After looking through forum posts, I thought it had something to do with termcap on the remote machine, but that appears not to be the case; I can initiate screen with no errors from an ssh session from another computer, one to which I don't generally have access. This suggests that I need to configure something on my local machine, but I haven't been able to figure out what or how. Although this post is tagged "gnu-screen" I suspect that I'm working with Berkeley screen, though I don't know whether that is a significant distinction.

Original source