Re: Terminfo settings et al
On Fri, Sep 07, 2007 at 01:05:02PM +0200, Eyolf Østrem wrote:
> Where and how should I set the TERM variable? I guess there are five
> possible levels here: environment/shell, Xterm, Screen, ncurses, and
> application.
> My distro's wiki (Archlinux) says that it's a bad idea to set the TERM
> variable in .bashrc, but that applications should be able to figure it
> out for themselves.
>
> So, which of these possible values of TERM do I put where?
> xterm
> xterm-256color
> screen-256color
> screen-256color-s
> screen-256color-bce
> screen-256color-bce-s
>
> Should it be the same everywhere I set it?
The TERM variable describes how the terminal behaves. Obviously, this
depends on the terminal in use. It might not be obvious that several
programs act to the system as if they were terminals. Here is a list of
possible "terminals" you might encounter:
- The Linux text console (accessible via Ctrl-Alt-F1 oder Ctrl-Alt-F2
while you are running X11 -- use Ctrl-Alt-F7 oder somesuch to get
back to X11).
- Different X11 terminal programs may exhibit different behaviors,
requiring different values of TERM: xterm, rxvt, urxvt, konsole,
gnome-terminal, mlterm, eterm, aterm, ... There are many, many,
many X11 terminal programs.
- The program screen also behaves like a terminal.
You can specify the $TERM value for xterm using "-tn foo" on the command
line, or an X ressource setting. For example, the following line in
~/.Xdefaults may be equivalent to "-tn foo":
XTerm*termName: foo
But this depends on whether ~/.Xdefaults is read in your environment...
To specify $TERM for screen, you can specify -t or -T on the command
line (forget which), or "term foo" or so in ~/.screenrc.
I lost track of what you already tried. For the interim, you can
explicitly set $TERM with "TERM=foo; export TERM" from the shell. Have
you tried that in various situations and do you now know what the
terminal needs to be?
Kai