Date: Mon, 14 Jan 2002 23:20:44 +0200 From: Giorgos Keramidas <keramida@freebsd.org> To: Anthony Campbell <ac@acampbell.org.uk> Cc: freebsd-questions@freebsd.org Subject: Re: Still can't get color in xterm properly. Message-ID: <20020114212044.GE31045@hades.hell.gr> In-Reply-To: <20020114170518.GA7846@debian.local> References: <20020114170518.GA7846@debian.local>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On 2002-01-14 17:05:18, Anthony Campbell wrote:
> I can set
>
> TERM=xterm-color; export TERM
>
> In an xterm window and it will work for that window, but not in others.
> If I put it in $HOME/.profile or in /etc/profile it causes wrong symbols
> to appear in the consoles and doesn't work in X.
>
> Where is one supposed to put it so that it is the default for X?
Since the replies that were given until now were specific to other
types of terminals, and their resources will most likely be ignored by
xterm(1), here is a short description of what you need.
Xterm(1) when started, it queries the X server for `xterm resources'.
These are pairs of `key: value' strings that can be used to customize
your xterm's. The xrdb(1) program can be used to manipulate the X
resource database. Each X program in its manpage describes what
resources it understands. In the xterm(1) manpage we can read:
RESOURCES
The program understands all of the core X Toolkit resource
names and classes as well as:
...
termName (class TermName)
Specifies the terminal type name to be set in the
TERM environment variable.
That is, if you set the XTerm*termName resource to a string, that
string will be used as the TERM environment variable of all the xterms
you start after setting it.
Try this by creating a file called .Xresources in your HOME directory
that contains:
XTerm*termName: xterm-color
and then running:
% xrdb -merge .Xresources
Start a new xterm(1) [so that is reads the new termName resource], and
type in it:
% echo $TERM
It should print your new TERM value :)
If you want .Xresources to be loaded every time you start X, then you
can edit .xinitrc and add a line that calls xrdb:
xrdb -merge .Xresources
exactly like you would do in your terminal prompt.
--
Giorgos Keramidas . . . . . . . . . keramida@{ceid.upatras.gr,freebsd.org}
FreeBSD Documentation Project . . . http://www.freebsd.org/docproj/
FreeBSD: The power to serve . . . . http://www.freebsd.org/
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
iD8DBQE8Q0us1g+UGjGGA7YRArdPAKCH/UQvXdgpGzptpNRn8wSQdtoqMQCgtvxJ
iQDQtmvYgJiZdNznGByZJVc=
=Ormo
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020114212044.GE31045>
