NetBSD Problem Report #9161

Received: (qmail 7936 invoked from network); 10 Jan 2000 16:39:37 -0000
Message-Id: <200001101622.KAA26074@rkr.kcnet.com>
Date: Mon, 10 Jan 2000 10:22:49 -0600 (CST)
From: Richard Rauch <rkr@rkr.kcnet.com>
Reply-To: rkr@rkr.kcnet.com
To: gnats-bugs@gnats.netbsd.org
Subject: ssh and TERMCAP environment variable
X-Send-Pr-Version: 3.95

>Number:         9161
>Category:       pkg
>Synopsis:       ssh forwards TERM, but not TERMCAP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    atatat
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 10 08:42:01 +0000 2000
>Closed-Date:    Thu Mar 15 19:23:14 +0000 2001
>Last-Modified:  Thu Mar 15 19:23:14 +0000 2001
>Originator:     Richard Rauch
>Release:        1.4.1
>Organization:
  "I probably don't know what I'm talking about."  --rkr@rkr.kcnet.com
>Environment:

System: NetBSD rkr.kcnet.com 1.4.1 NetBSD 1.4.1 (olibGENERIC) #3: Tue Nov 30 01:09:25 CST 1999 root@rkr.kcnet.com:/usr/src/sys/arch/i386/compile/olibGENERIC i386


>Description:
  When you ssh to another machine, your TERM variable is carried through.
  However, if your TERM corresponds to an entry in TERMCAP (e.g., if
  you are using window(1), or the screen package), you may well have your
  term-type rejected by the remote.

  You can manually install a TERMCAP variable remotely, of course.  Or,
  you can lie about your terminal type (this doesn't seem to get you very
  far if you are using window, but screen is more or less vt100-compatible.
  Your mileage may vary with other situations.)

  It seems to me to be a bug to forward TERM without at least conditionally
  carrying TERMCAP.

>How-To-Repeat:
  Start window or screen.
  ssh to a remote system.
  Very likely you will be told that your terminal type isn't supported,
  and you'll be forced to a ``dumb'' terminal.

>Fix:
  I offer only workarounds, here.  Probably it's not difficult to
  patch, but I don't want to mess with anything that is govered by both
  export laws and patents.  (^&

  According to ssh's man-page, you can modify /etc/environment to
  forward additional variables.  No information is given on how to
  do that (that's another send-pr to submit, I guess; technically
  a different problem).  Theoretically, that's one work-around.
  (What I tried, and which didn't work, was to put a single line,
  TERMCAP=$TERMCAP, in my /etc/environment.  It did no good.)

  You can manually carry over a TERMCAP definition.  (screen can
  even dump a termcap definition for you, allegedly.)

  You can lie about your terminal type (or accept relegation to ``dumb'').

  You can give up using window/screen.  (Those who lack virtual consoles
  and X support probably won't find this an appealing option.  And, I find
  window & screen preferable to virtual consoles (with a slight nod to
  window for ease-of-use).)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: atatat 
State-Changed-When: Thu Mar 15 11:20:07 PST 2001 
State-Changed-Why:  
PR closed; no resolution possible.  The ssh protocol has no provision in 
it for passing arbitrary environment variables, and the files that the 
ssh manpages refer to (/etc/environment and ~/.ssh/environment) are used 
for setting additional environment variables *after* one has 
authenticated, not for specifying additional variables to be passed. 


Responsible-Changed-From-To: pkg-manager->atatat 
Responsible-Changed-By: atatat 
Responsible-Changed-When: Thu Mar 15 11:20:07 PST 2001 
Responsible-Changed-Why:  
I closed the PR. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.