| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
| <HTML> |
| <HEAD> |
| <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> |
| <TITLE>The Linux keyboard and console HOWTO: The TERM variable</TITLE> |
| <LINK HREF="kbd.FAQ-12.html" REL=next> |
| <LINK HREF="kbd.FAQ-10.html" REL=previous> |
| <LINK HREF="kbd.FAQ.html#toc11" REL=contents> |
| </HEAD> |
| <BODY> |
| <A HREF="kbd.FAQ-12.html">Next</A> |
| <A HREF="kbd.FAQ-10.html">Previous</A> |
| <A HREF="kbd.FAQ.html#toc11">Contents</A> |
| <HR> |
| <H2><A NAME="s11">11. The TERM variable</A></H2> |
| |
| <P> |
| <!-- |
| TERM environment variable |
| --> |
| |
| <!-- |
| environment variables!TERM |
| --> |
| <P>Many programs use the <CODE>TERM</CODE> variable and the database |
| <CODE>/etc/termcap</CODE> or <CODE>/usr/lib/terminfo/*</CODE> to decide |
| which strings to send for clear screen, move cursor, etc., |
| and sometimes also to decide which string is sent |
| by the users backspace key, function keys etc. |
| This value is first set by the kernel (for the console). |
| Usually, this variable is re-set by <CODE>getty</CODE>, using <CODE>/etc/ttytype</CODE> or |
| the argument specified in <CODE>/etc/inittab</CODE>. |
| Sometimes, it is also set in <CODE>/etc/profile</CODE>. |
| <P>Older systems use <CODE>TERM=console</CODE> or <CODE>TERM=con80x25</CODE>. Newer systems (with |
| ncurses 1.8.6) use the more specific <CODE>TERM=linux</CODE> or <CODE>TERM=linux-80x25</CODE>. |
| However, old versions of <CODE>setterm</CODE> test for <CODE>TERM=con*</CODE> and hence fail |
| to work with <CODE>TERM=linux</CODE>. |
| <P>Since kernel version 1.3.2, the kernel default for the console is |
| <CODE>TERM=linux</CODE>. |
| <P>If you have a termcap without entry for linux, add the word linux |
| to the entry for the console: |
| <BLOCKQUOTE><CODE> |
| <PRE> |
| console|con80x25|linux:\ |
| </PRE> |
| </CODE></BLOCKQUOTE> |
| |
| and make <CODE>/usr/lib/terminfo/l/linux</CODE> a copy of or symbolic link to |
| <CODE>/usr/lib/terminfo/c/console</CODE>. |
| <P> |
| <H2><A NAME="ss11.1">11.1 Terminfo</A> |
| </H2> |
| |
| <P> |
| <!-- |
| terminfo |
| --> |
| <P>The terminfo entry for the linux console from ncurses 1.8.6 misses the |
| entry <CODE>kich1=\E[2~</CODE>, needed by some programs. |
| Edit the file and <CODE>tic</CODE> it. |
| <P> |
| <HR> |
| <A HREF="kbd.FAQ-12.html">Next</A> |
| <A HREF="kbd.FAQ-10.html">Previous</A> |
| <A HREF="kbd.FAQ.html#toc11">Contents</A> |
| </BODY> |
| </HTML> |