[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to change termcap defaults of an xterm?



spiegl@hamster.appl-math.tu-muenchen.de (Andy Spiegl) writes:

> I would like to change the way xterm displays highlighted words.
> Currently it underlines those words, but I would like to have it
> change the background color to something else, let's say yellow
> (as my xterm background is set to dark blue).
> 
> What do I have to do to achieve this?  Can think of which HowTo
> to look for.

I don't know if it is in a howto, but I have been doing it for several
years.  You just need to have the tools 'infocmp' and 'tic', which are
both in the 'ncurses-bin' package.  You can change the system
definition or just your personal definition, but if you change the
system one, you will probably have it overwritten whenever you
upgrade.

Assuming you are doing it as a user, just type something like:
    'infocmp xterm >xterm'
This will create a file called xterm with the terminfo source.
I then change the values of bold, smso, and smul to:
    bold=\E[1;36m, smso=\E[1;33m, smul=\E[4;1;32m
In this case, bold is set to bright cyan foreground, standout mode is
set to bright yellow, and underline mode is set to bright green
with underline.  You would use something like 'smul=\E[4;43m' to set
the underline to have a yellow background.

You can test your colors at the shell prompt with something like:
   echo '\33[43m Testing yellow background \33[m'

Once you have everything set up as you like, just type 'tic xterm'
and it will compile the terminfo definition, and put it in a
'.terminfo/' subdirecory in your home directory.  Your shell will
immediately start working with the new entry.  If you do this as root,
it will instead overwrite the system entry.

-- 
Carl Johnson		carlj@peak.org


Reply to: