[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Colour in xterm on another host
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Colour in xterm on another host
- From: Luis Bruno <lbruno_(_at_)_zbit_(_dot_)_pt>
- Date: Wed, 13 Nov 2002 20:37:33 +0000
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
Robert Ian Smit wrote:
> The fact that I use
> different terminals resulting in different $TERMs clouds the issue
You just have to describe your terminal better, so that programs on
your OpenBSD box know that you do have color.
For a reason I don't know about, OpenBSD's xterm definition does not
have color; I assume that linux's has.
You can follow the advice given earlier:
[ $TERM = "xterm" ] && eval `tset -Qs xterm-color`
If you place this in your shell startup script, you won't have to change
$TERM in your linux client.
> I have some conceptual knowledge of what happens when I log in to a
> system, but have no idea how it actually works.
After successfully logging in, you are dropped into your shell. Here
you can start screen-oriented programs like vi, midnight commander,
and others. In these programs, you update characters on your screen,
instead of just reading commands from the keyboard and showing the
results (like when you run 'ls' in the shell).
The problem is that there are many terminals out there, each with its
own set of capabilities; some are fixed size like the vt220 (80x24),
others are terminal emulators like xterm and can have any size you want,
To control the behaviour of the terminal, programs like vi must know how
to clear the screen or how to change the background color, for example.
This is done with special character sequences (escape sequences), each
with its own meaning in every terminal. For more details, please read
the description of ncurses(3); terminfo(5) describes the format of the
database which describes the escape sequences for every terminal.
So how does vi know which escape sequence to use when clearing the
terminal? By looking at your $TERM, and getting the appropriate value
from the terminfo entry for $TERM.
PS: This is my view of the subject, of course. Any mistakes, please
Visit your host, monkey.org