ITEM: H3425L

How do I create a term info file?


Question:

I have terminal that uses an emulation that is not included in the 
AIX 3.2.5 terminfo file.  How do I create a new terminfo file for my 
terminal?  I know the character sequences for the terminal, I just 
don't understand how to get terminfo to work.

Response:

The easiest way to create your own terminfo file is to copy an 
already existing terminfo file from the /usr/lib/terminfo directory
to whatever name you like.  

I.  Make a copy of a terminfo file

For example, if you wanted to make a copy of the 'dec.ti' file, you 
would execute the following commands:

cd /usr/lib/terminfo
cp dec.ti mine.ti

II.  Modify the new terminfo file

Now all you have to do is to modify 'mine.ti' according to your 
emulation using your favorite UNIX editor.  You will need to do the 
following steps:

  1. Change the name of the terminal emulation
  2. Change the escape sequences 
  3. Delete all extraneous emulations from the file.  

In the example of 'mine.ti' you could use the first emulation (vt100-am)
as a template.  That means I would leave all the white space alone, 
changing only the data.

Step 1. To change the name of the terminal emulation, you would change the 
following line from

  vt100-am|dec vt100,

to

  termxyz,

where termxyz is the name of your terminal.

Step 2. To change the escape sequences, simply substitute the escape sequence 
your terminal expects to the right of the appropriate terminfo variable.

If your terminal expected \\030PH to clear the screen, remove

  clear=\\E[H\\E[2J$\<50>

and replace it with 

  clear=\\030PH

Repeat this step for all the terminfo variables that your emulation will use.

Step 3. To delete all extraneous data from the file, delete everything in the 
file below the emulation you are modifying.  This is an important step
because subsequent entries refer back to the first entry, something that
no longer exists because you have changed it.  In the example of the 
mine.ti file, you will want to delete the following line and everything
below it.

vt100|vt100-nam|vt100x|ibm5550|ibm5570|vt100 w/no am,

III. Using the emulator

To use the terminfo file you have just created, follow these three steps:

  1. Check your TERMINFO variable
  2. Compile the mine.ti file
  3. Set your TERM variable.

Step 1. To check your TERMINFO variable, type:

  echo $TERMINFO

If it says,

  /usr/lib/terminfo

just go on to the next step.  If is says anything else, type:

  export TERMINFO=/usr/lib/terminfo

Step 2. To compile your new terminfo file, type:

  tic mine.ti

Step 3. To set your TERM variable, type:
   export TERM=termxyz

where termxyz in the name of the emulation you created.

Question:

I have followed the above procedure, but when I send a clear to 
the terminal, instead of sending \\030PH, it sends, \\030\\007\\007PH.
The new sequence is getting sent, but the screen is not clearing 
and two bells (\\007) are getting inserted.  Where are they coming 
from?

Response:

You are using FacetTerm, a software package that runs on the RISC and 
allows you to hot key between terminal sessions.  It runs on a lower level 
than terminfo and it tries to interpret every character it gets from terminfo. 
You had not changed the Facet Term emulation, and it did not recognize the 
sequence we were sending.  The beeps are inserted to indicate that the 
emulation does not recognize the character string.  When you log in as 
root, bypassing FacetTerm, the screen clears using the termxyz emulator 
that you created.  


Support Line: How do I create a term info file? ITEM: H3425L
Dated: March 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:47
Comments or suggestions? Contact us