/etc/termcap linux 条目的由来

use*_*840 7 linux termcap terminal history console

为什么在 中描述了一种$TERM调用类型?为什么以及何时创建它,它的意义是什么?我们就不能呆在那里吗?是否只是一个习惯的名称和一个Linux控制台(比如说,一组功能或者是目录下根本无人问津习惯名称)或在那里被介绍时,它后面的任何技术原因?linux/etc/termcapvt-genericlinuxetchome

Tho*_*key 11

终端描述以 Linux 命名,它提供了自己的控制台模拟器(与其他几个内核一样)。

除了 FreeBSD,所有 Linux 和现代 BSD 平台都通过从ncurses 中的 terminfo 数据库派生来获得“termcap” 。控制台条目特定于实现它们的系统(与在多个平台上运行的许多终端模拟器不同)。

ncurses 1.8.6(1994 年 10 月)中对linux终端描述的评论指出:

# Note that the statdard Linux console is now called 'linux' instead
# of 'console'. terminals with sizes other than 80x25 need to append
# their size to linux and add an entry like the one for 132x43 below
Run Code Online (Sandbox Code Playgroud)

那是特定于 Linux 的,但随着 ncurses 的移植而进行了概括。

在 ncurses 来源中,这部分INSTALL很旧(见于1995 年 11 月的1.9.7a),但并未过时:

    Naming the Console Terminal                                            

    In various systems there has been a practice of designating the system
    console driver type as `console'.  Please do not do this!  It
    complicates peoples' lives, because it can mean that several different
    terminfo entries from different operating systems all logically want to
    be called `console'.

    Please pick a name unique to your console driver and set that up
    in the /etc/inittab table or local equivalent.  Send the entry to the
    terminfo maintainer (listed in the misc/terminfo file) to be included
    in the terminfo file, if it's not already there.  See the
    term(7) manual page included with this distribution for more on
    conventions for choosing type names.

    Here are some recommended primary console names:

            linux   -- Linux console driver
            freebsd -- FreeBSD
            netbsd  -- NetBSD
            bsdos   -- BSD/OS

    If you are responsible for integrating ncurses for one of these
    distributions, please either use the recommended name or get back
    to us explaining why you don't want to, so we can work out nomenclature
    that will make users' lives easier rather than harder.
Run Code Online (Sandbox Code Playgroud)

终端数据库中有一个部分用于这些:ANSI, UNIX CONSOLE, AND SPECIAL TYPES,虽然没有“vt-generic”描述,也没有(鉴于变体之间的差异),是否有合理的选择。

如果您寻找“vt-generic”,您可能会发现只有在不太流行的实现中,例如 Informix(见本文件):

#   @(#)/etc/termcap    0.0 
#
#   Informix product aware termcap file
#
#   Author: Marco Greco, <marcog@ctonline.it>, Catania, Italy
#
#   Initial release: Jun 97
#   Current release: Jul 98
#
#   Absolutely no warranty -- use at your own risk
#
#   Notes: Adapted from the default Slackware termcap file:
#   added gs, ge, gb, ZG, ZA capabilities, shifted function keys
#   down by one, added ki, kj, kf, kg
#
#   Limit the size of each entry - 4gl apps core dump if applicable
#   entry too long
#
#   Entries other than vt's, console & xterm *untested*
#
# From: miquels@drinkel.ow.org (Miquel van Smoorenburg)
#
# Okay guys, here is a shorter termcap that does have most
# capabilities and is ncurses compatible. If it works for you
# I'd like to hear about it.
Run Code Online (Sandbox Code Playgroud)

进一步阅读: