From owner-freebsd-questions Fri Jul 11 09:37:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA19264 for questions-outgoing; Fri, 11 Jul 1997 09:37:45 -0700 (PDT) Received: from DonaldBurr.dyn.ml.org (dburr@ppp6209.la.inreach.net [199.107.160.209]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA19259 for ; Fri, 11 Jul 1997 09:37:40 -0700 (PDT) Received: from localhost (dburr@localhost) by DonaldBurr.dyn.ml.org (8.8.5/8.8.5-STARFLEET) with SMTP id JAA02231 for ; Fri, 11 Jul 1997 09:38:12 -0700 X-Authentication-Warning: DonaldBurr.dyn.ml.org: dburr owned process doing -bs Date: Fri, 11 Jul 1997 09:38:12 -0700 (PDT) From: Donald Burr X-Sender: dburr@DonaldBurr.dyn.ml.org To: freebsd-questions@freebsd.org Subject: Adding linux terminal entry in FreeBSD 2.2.2 - how? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I just added a new FreeBSD 2.2.2 box to my home ethernet. I strongly doubt that hardware has anything to do with this problem, so the details aren't that important. Suffice it to say that this is a FreeBSD 2.2.2 system running on a fairly generic 486 with 16 MB of RAM. I've also got a Linux machine here at home (running RedHat 4.2, based on kernel 2.0.30). This is also a 486, incidentally, but with 24 MB of RAM. Alot of times I am on the Linux machine on a text console (I don't use X that much) and need to telnet or rlogin into my FreeBSD box. Alot of times I need to use programs that use full-screen mode, such as "vi", "trn", "nn", etc. Unfortunately, I get the following error message when I telnet or rlogin in to my FreeBSD box: ---------- [dburr@greatbird dburr]$ telnet voyager Trying 192.160.60.3... Connected to voyager.starfleet.gov. Escape character is '^]'. FreeBSD (voyager.starfleet.gov) (ttyp0) login: dburr Password: Last login: Fri Jul 11 09:26:15 from starfleet.gov Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 2.2.2-RELEASE (VOYAGER) #0: Wed Jul 9 20:49:02 PDT 1997 Welcome aboard the U.S.S. Voyager! tcsh: No entry for terminal type "linux" tcsh: using dumb terminal settings. [dburr@voyager:101]% ---------- "Hmm," I thought, "guess FreeBSD doesn't know about the 'linux' terminal." So I figured I'd rip out the "linux" entry in /etc/termcap on my linux box and stick it in /etc/termcap on my FreeBSD box. This is the entry I used: ---------- linux|linux console:\ :am:eo:mi:ms:ut:xn:xo:\ :co#80:it#8:li#25:\ :&7=^Z:@7=\E[4~:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\ :F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\ :F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\ :IC=\E[%d@:K2=\E[G:al=\E[L:bl=^G:cd=\E[J:ce=\E[K:\ :ch=\E[%i%dG:cl=\E[H\E[J:cm=\E[%i%d;%dH:cr=^M:\ :cs=\E[%i%d;%dr:ct=\E[3g:cv=\E[%i%dd:dc=\E[P:dl=\E[M:\ :do=^J:ei=\E[4l:ho=\E[H:ic=\E[@:im=\E[4h:k1=\E[[A:\ :k2=\E[[B:k3=\E[[C:k4=\E[[D:k5=\E[[E:k6=\E[17~:\ :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kB=\E[Z:\ :kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\E[B:\ :kh=\E[1~:kl=\E[D:kr=\E[C:ku=\E[A:le=^H:mr=\E[7m:\ :nd=\E[C:nw=^M^J:r1=\Ec:rc=\E8:sc=\E7:sf=^J:sr=\EM:\ :st=\EH:ta=^I:u6=\E[%i%d;%dR:u7=\E[6n:u8=\E[?6c:\ :u9=\E[c:up=\E[A:vb=200\E[?5h\E[?5l:ve=\E[?25h:\ :vi=\E[?25l:tc=klone+sgr:tc=klone+color:tc=klone+acs: linux-m|Linux console no color:\ :Co@:pa@:\ :AB@:AF@:Sb@:Sf@:tc=linux: ---------- (of course, to do this, I had to load up X, because FreeBSD had a pretty decent (i.e. working) "xterm" termcap entry.) After adding these lines to /etc/termcap, I was then able to log in to FreeBSD from a Linux console without the "no entry for terminal type 'linux'" message... BUT I still couldn't use visual-mode programs! Witness the following two error messages, one from the "clear" command (which simply clears the screen... or should, at any rate), and one from the "vi" command: ---------- [dburr@voyager:101]% clear tput: tgetent failure: No such file or directory [dburr@voyager:102]% vi foo.c ex/vi: Error: linux: No such file or directory [dburr@voyager:103]% ---------- I must confess that I am at a total loss here. What does this error mean, and how can I fix it? If you folks can offer any suggestions whatsoever, I'd be very grateful. Please either respond to the list or (preferably, if possible) send me an e-mail response as well. Thank you in advance for your assistance! Donald Burr - Ask me for my PGP key | PGP: Your WWW HomePage: http://DonaldBurr.base.org/ ICQ #1347455 | right to Address: P.O. Box 91212, Santa Barbara, CA 93190-1212 | 'Net privacy. Phone: (805) 564-1871 FAX: (800) 492-5954 | USE IT.