csh Cannot open /etc/termcap after starting "screen"

Ivan Voras ivoras at freebsd.org
Thu Jun 16 17:19:03 UTC 2011


This *looks* like it should be a trivial problem (or at least 
often-encountered one) but short of debugging both screen and tcsh, I 
have no ideas what to do next...

On several machines (seemingly random, some are running 7-stable, others 
8-stable), I get this message after starting "screen", written on the 
newly created screen:

csh: Cannot open /etc/termcap.
csh: using dumb terminal settings.

The problem is: this also happens whan I'm doing it as the root user, 
and /etc/termcap is a symlink to /usr/share/misc/termcap, which 
definitely exists and is readable. To make it even stranger, it looks 
like the environment contains something which seems to be valid termcap 

lara:/home/ivoras# setenv
TERMCAP=SC|screen|VT 100/ANSI X3.64 virtual terminal:\

The shell and all started programs are misbehaving and/or treating the 
terminal as "dumb". For example, "mc" writes this:

lara:/home/ivoras# mc
Unknown terminal: screen
Check the TERM environment variable.
Also make sure that the terminal is defined in the terminfo database.
Alternatively, set the TERMCAP environment variable to the desired
termcap entry.

There really isn't a termcap line in /etc/termcap beginning with 
^screen, but there is one beginning with ^SC containing the entry which 
is also in the environment listing above (which fails with the same 
error if I set it).

The system works if I set some other terminal type like "xterm".

Any ideas? Why is the "screen" terminal type so special?

More information about the freebsd-stable mailing list