[Wylug-discuss] Terminal software

Jim Jackson jj at comp.leeds.ac.uk
Wed Apr 20 10:29:15 BST 2005



On Sat, 16 Apr 2005, ALLEN, David wrote:

> Hi,
>
> I would really appreciate some help with terminal software and any answers
> to my questions would be most welcome.
>
> If you run a terminal on a client and rlogin to a server, is the terminfo
> data used from the server or client? Is $TERM specified to access the
> terminfo or passed thro' to the application over the rlogin. If the terminal
> software is said not to support a specific terminal, why are the correct
> function key escape characters displayed when the function key is pressed?
> If the $TERM is set to the unsupported terminal will it work?

the $TERM affects the terminfo/termcap-aware running application.
It tells the application how to create the right character sequences to 
provide control over e.g. where to move the cursor, how to clear the 
screen, how to change char attributes - colour, underscore, blinking etc

So in this case on the server. The only thing the "client" provides is a 
display that obeys the control sequences for cursor/effect control of 
the terminal "window".

When you press a function key a certain control sequence of characters are 
generated and sent to the app running on the server. When the app. 
recognises this funny seq. of chars as say "F1" depends on it having bene 
built with the correct libraries and having the correct TERM set, and that 
TERM defined in the terminfo or termcap databases. If it doesn't have TERM 
Set or is set wrongly your app. may simple display the control sequence 
characters as .... well characters. ANSI and DEC type VT aware "terminals" 
generate and respond to sequences beginnign with an ESC char (Decimal 27, 
HEX 0x1B) and next a '[' followed by several printable ASCII chars that 
define the "function".

It's good to remember that a Terminal was once an independant piece of 
hardware, essentially a keyboard and a display, and display controller,
that had a serial RS232 link to the "computer". Keydpressions caused a 
character or sequence of characters to up the rs232 link to the computer, 
and anything the computer sent down the rs232 link was interprested by the 
display controller and either displayed (inthe case of printable ascii 
chars) or actioned in the case of a control char. (eg. CR (13) to goto 
start of line, LF (10) to down a line) or a control sequernce of chars
e.g. ESC [ 0 ; 0 H move cursor to star of screen in ANSI terminals

Nowadays, a "terminal" is some software pretending to be a terminal (a 
terminal emulator such as xterm, gnome-terminal etc) and the link the 
application is some internal path or some network TCP/IP link over which 
the characters flow - but flow they do just as they did over the old rs232 
link.

  HTH
Jim


http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-5.html

http://www.linux-tutorial.info/modules.php?name=Tutorial&pageid=72



> Is a "colour terminal"  one in which background colour can be specified or
> colours can be specified by the application, and if the application does
> display in colour, how is this info passed to the terminal. If I can change
> the cursor colour, for example, is colour working? Why, then, cannot the
> application specify the colours?
>
> What is the purpose of the cursors file?
>
> As you may gather, I am very confused by this and any help would be welcome
> so I can achieve a colour VT220 xterm with working function keys and graphic
> characters/colours specified by my application!
>
> Cheers
>
> David
>
>
>
>
>
> _______________________________________________
> Wylug-discuss mailing list
> Wylug-discuss at wylug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/wylug-discuss
>





More information about the Wylug-discuss mailing list