From owner-freebsd-questions@FreeBSD.ORG Mon Jan 9 20:36:32 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1184C1065680 for ; Mon, 9 Jan 2012 20:36:32 +0000 (UTC) (envelope-from jrm@ftfl.ca) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C50748FC27 for ; Mon, 9 Jan 2012 20:36:31 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so4698581vbb.13 for ; Mon, 09 Jan 2012 12:36:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.28.238 with SMTP id e14mr8147256vdh.96.1326141390963; Mon, 09 Jan 2012 12:36:30 -0800 (PST) Received: by 10.52.187.97 with HTTP; Mon, 9 Jan 2012 12:36:30 -0800 (PST) X-Originating-IP: [129.173.34.203] In-Reply-To: References: Date: Mon, 9 Jan 2012 16:36:30 -0400 Message-ID: From: Joseph Mingrone To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: problem with terminal capabilities when using terminal from within emacs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 20:36:32 -0000 On Sun, Jan 8, 2012 at 13:50, Joseph Mingrone wrote: > From within emacs, if I invoke a new multi-term buffer with C-c c, the > TERM environment variable is set to eterm-color and a TERMCAP variable > is also set and > everything works fine. =C2=A0However, if I ssh to a remote host from with= in > this buffer, only the TERM variable remains set and the keybindings > don't work. =C2=A0If I manually set the TERMCAP variable nothing changes. > > Is there =C2=A0a way to ssh to a remote host from within a multi-term > buffer and have the terminal capabilities work out? > > I'm running emacs 23.3 on 8-STABLE. > I think I have a solution for anyone running into the same problem. Any comments or suggestions are welcome. Add the entry for eterm-color (copied below) to /usr/share/misc/termcap. # cd /usr/share/misc && mv /usr/share/misc/termcap.db /usr/share/misc/termcap.db.bak # cap_mkdb termcap # Termcap entry for eterm-color eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96:\ :am:bs:mi:pt:xn:\ :Co#8:co#166:li#48:pa#64:\ :@7=3D\E[4~:AB=3D\E[4%dm:AF=3D\E[3%dm:AL=3D\E[%dL:DC=3D\E[%dP:\ :DL=3D\E[%dM:DO=3D\E[%dB:IC=3D\E[%d@:LE=3D\E[%dD:RI=3D\E[%dC:\ :UP=3D\E[%dA:al=3D\E[L:bl=3D^G:cb=3D\E[1K:cd=3D\E[J:ce=3D\E[K:\ :cl=3D\E[H\E[J:cm=3D\E[%i%d;%dH:cr=3D^M:cs=3D\E[%i%d;%dr:dc=3D\E[P:= \ :dl=3D\E[M:do=3D^J:ei=3D\E[4l:ho=3D\E[H:im=3D\E[4h:kD=3D^[[3~:\ :kN=3D\E[6~:kP=3D\E[5~:kb=3D^?:kd=3D\EOB:kh=3D\E[1~:kl=3D\EOD:\ :kr=3D\EOC:ku=3D\EOA:le=3D^H:md=3D\E[1m:me=3D\E[m:mk=3D\E[8m:mr=3D\= E[7m:\ :nd=3D\E[C:op=3D\E[39;49m:r1=3D\Ec:rc=3D\E8:sc=3D\E7:se=3D\E[27m:sf= =3D^J:\ :so=3D\E[7m:ta=3D^I:ue=3D\E[m:\ :up=3D\E[A:us=3D\E[4m: --=20 ---------------------------------------------------------------------- Public key: http://gly.ath.cx/pub_key.txt ----------------------------------------------------------------------