The mechanism for modifying an existing terminfo definition is quite simple.
- Create a source definition for the terminal.
- Compile the source definition for the terminal into a binary entry in the terminfo database.
- Copy the new terminal definitions to the /lib/terminfo/w directory for a complete solution.
These 3 simple steps are shown below for the wyse definition (Note the 'vi' editor commands are shown to help out).
1. First you will need a valid Wyse terminal definition to create the .ti file that you will use to compile and create a new Wyse terminfo entries.
Using the vi editor, edit the /tmp/wyse.ti file by typing "vi /tmp/wyse.ti"
Copy and paste this into the file. (Make sure you are in insert mode by typing "i" in the editor)
Here is the termcap file:
------------------ Cut Here --------------------------
60|wy60|wyse60|wy99gt|wyse99gt|Wyse 60 and Wyse 99GT:\
:am:bw:hs:km:mi:ms:bs:pt:\ :co#80:li#24:kn#8:\ :ae=\EH^C:al=4\EE:as=\EH^B:bt=\EI:cd=100\Ey:ce=\Et:\ :cl=100\E*:cm=\E=%+ %+ :ct=\E0:dc=10\EW:dl=5\ER:\ :ds=\EF\r:ei=\Er:fs=\r:ho=^^:i1=\EcB0\EcC1:im=\Eq:\ :ip=3:\ :is=\Ed$\EcD\E'\Er\EH^C\Ed/\EO\Ee1\Ed*\E`@\E`9\E`1^N^T:\ :k1=^A@\r:k2=^AA\r:k3=^AB\r:k4=^AC\r:k5=^AD\r:\ :k6=^AE\r:k7=^AF\r:k8=^AG\r:k9=^AH\r:kb=\b:kd=\n:\ :kh=^^:kl=\b:kr=\f:ku=^K:nd=\f:r1=150\E~!\E~4:\ :r2=150\EeF:r3=150\EwG\Ee(:se=\EG0:so=\EGt:sr=7\Ej:\ :st=\E1:ts=\EF:uc=\EG8%.\EG0:ue=\EG0:up=^K:us=\EG8:\ :ve=\E`1:vi=\E`0:ko=le,do,nd,up,dc,dl,ho,al: wy60-25-w|wyse60-25-w|wyse 60 132-column 25-lines:\ :am:bw:hs:km:mi:ms:bs:pt:\ :co#132:li#25:kn#8:\ :ae=\EH^C:al=4\EE:as=\EH^B:bt=\EI:cd=100\Ey:ce=\Et:\ :cl=100\E*:cm=\Ea%i%dR%d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0:\ :ko=le,do,nd,up,dc,dl,ho,al:
------------------ Cut Here --------------------------
Next, get out of insert mode in the editor by pressing escape.
Then type :wq and enter to write and quite the editor.
This will create the /tmp/wyse.ti file needed for the next step.
In this compilation of the terminal definition step, type the following at the shell prompt:
# tic /tmp/wyse.ti
This will create the necessary terminfo database entries for the new wyse terminal definition.
Next, for completion, copy the newly created terminal definitions. Type the following:
cp /usr/share/terminfo/w/* /lib/terminfo/w and press <enter>
After the items are copied, you can test and examine the definitiions by using "infocmp" utility.
The infocmp command is used to de-compile the binary database entry for the wyse terminal and the output is re-directed to file wyse.ti. This file can then be modified with any editor, in this example vi was shown. Finally , as root user, the tic command is used to compile the source file definition into a compiled binary entry in the terminfo database.
The layout of the source file 'wyse.ti' is explained fully by using the Unix command 'man terminfo'.
No comments:
Post a Comment