URL: <https://savannah.gnu.org/bugs/?68239>
Summary: Add option to suppress $TERMCAP export into window
environments
Group: GNU Screen
Submitter: gushi
Submitted: Tue 14 Apr 2026 12:36:04 AM UTC
Category: Feature Request
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Unlocked
Release: None
Fixed Release: None
Planned Release: None
Work Required: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 14 Apr 2026 12:36:04 AM UTC By: Dan Mahoney <gushi>
Screen unconditionally exports a $TERMCAP environment variable into every
window it creates. This was useful historically when applications would read
$TERMCAP directly to avoid filesystem lookups against /etc/termcap. However,
any application linking against modern libtinfow or libncurses ignores
$TERMCAP entirely and queries the terminfo database directly.
The result is that $TERMCAP in a Screen session is effectively dead weight —
it clutters the environment, can create confusion when debugging terminal
issues (e.g. seeing duplicate so= entries when grepping $TERMCAP), and
provides no benefit to any application likely to be run in a modern Screen
session.
A .screenrc directive such as termcap-export off would allow users to suppress
this behavior. Alternatively, Screen could simply stop exporting $TERMCAP by
default when a terminfo entry for the session's $TERM is available.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68239>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
