Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Nov 2002 10:22:22 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: terminal incompatibility
Message-ID:  <20021122102222.GC21672@happy-idiot-talk.infracaninophi>
In-Reply-To: <20021122091503.89000.qmail@web11202.mail.yahoo.com>
References:  <20021122091503.89000.qmail@web11202.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 22, 2002 at 01:15:03AM -0800, Rotaru Razvan wrote:

> Well this is just another mail about a problem i think a lot of people
> have. As i noticed by default terminals in bsd are named cons25. My
> problem? no compatibility with linux terminals (or with xterm). 
> First of all some console applications behave different in cons25 and
> xterm (for instance sysinstall: is colorful and nice in cons25, b&w and
> totally messed up un xterm). Vim has problems with the keyboard
> (doesn't recognize "up arrow" ,"down arrow" ...). Midnight Commander is
> b&w in cons25. 

That's a common problem between different Unix flavours.  One type
doesn't have any entries for the other's terminal types in it's
temcap/terminfo database, or it knows it by a different name.

You can change your FreeBSD xterms into glorious technicolour by adding:

    xterm*termName:         xterm-color

to ~/.Xdefaults, and arranging for your .xinitrc (startx) or .xsession
(xdm) to run:

    /usr/X11R6/bin/xrdb -merge ${HOME}/.Xdefaults

However, the xterm, even in monochrome, should work correctly for
curses based applications.

> So you see a lot of problems with these terminals. Generally I think
> they arise because most of applications where not designed for bsd
> terminals. 

Actually, it's not that bad.  If you can install the correct terminal
definitions on your linux box, all of those applications should start
to work correctly. 

> I figured out a solution may be to make all terminals linux-type
> (assuming that I use most of the time, linux-terminal applications. So
> I edited /etc/ttys and changed "cons25" to "linux". And this is the

As you've found out, that won't work.  The terminal type is determined
by the drivers in the kernel.  You've got to use cons25 or one of the
consNN variants in /etc/termcap, depending on what character sets you
want to display and what resolution you run your console at.

> point where everithing stops working. Well Midnight Commander is
> colorful but messed up. Not even ee works anymore. 
> Maybe some of you guy can give me a hand on this, how to make all
> linux-terminal applications work with bsd.

The quickest and easiest thing for you to do is install the
misc/screen port, and set it up to use a vt100 terminal type.  Just
about everything recognises vt100, and it's practically identical to
xterm anyhow.

Otherwise, you can copy the cons25 and cons25w entries to /etc/termcap
on your linux machine
 
> Second question:
> Is it necessary to have linux compatibility installed, in order to have
> java(jdk13) in bsd? What does this compatbility mean? doesn't it affect
> memory usage and speed of the system? to tell you frankly i don't like
> the sound of it.

You need to have a JDK installed in order to compile the native JDK.
The first time you install the native JDK you have no choice but to
install one of the pre-compiled linux JDK's to do that.  Once you've
got the native JDK installed, you can delete the linux JDK.  You can
use the native JDK to upgrade the native JDK if you set
'NATIVE_BOOTSTRAP=yes' on the make command line (or in pkgtools.conf if
you're a portupgrade(1) afficionado).

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
                                                      Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021122102222.GC21672>