Evil, stinky fonts under Netscape

Kevin Buettner kev@primenet.com
Tue, 18 Jul 2000 16:03:11 -0700


On Jul 18,  1:36pm, KeithSmith wrote:

> After reading Mark's email I search my system for the .Xdefaults.  I
> do not have this file at all.  Does anyone know where this file should
> be at or what should be in it other than the line listed below?

.Xdefaults belongs in your home directory.

The purpose of .Xdefaults is to allow you to customize the behavior
of X applications through the setting of X resources.  If you are
happy with the way that all of your X applications start up, there
is no need to modify it at all.

Let's suppose for pedagogical purposes that you use the xmag program a
lot and that you'd rather have the close button say "quit" instead of
"close" on it.

You could change this by adding the following entry to your .Xdefaults
file:

Xmag*close.label:quit

Now let's suppose that you find yourself clicking on the close button
(now labeled "quit") accidentally.  Perhaps changing the color to red
will help call attention to the fact that this is a special button.
You can do that by adding the following entry:

Xmag*close.foreground:red

Now let's suppose you want to make the quit button even brighter.  You
could replace the preceding entry with the following two entries:

Xmag*close.foreground:white
Xmag*close.background:red

(You may need to use the xrdb program to load your .Xdefaults file
onto your X server; try "xrdb -merge ~/.Xdefaults".)

Many of the traditional X programs are *very* customizable via the use
of X resources.  (OTOH, I don't think that either GNOME or KDE
applications allow quite the same degree of customization.) In order
to see what widget hierarchy along with the resources that you can
set, you should try using the ``editres'' program.  This program will
retrieve a widget tree and allow you to examine and set the X
resources used by the application.

Not all X applications understand the editres protocol, so your next
line of recourse is a man page or, in the case of netscape, the
Netscape.ad file contains all of the defaults used by netscape along
with extensive comments in order to perform the customization.  On my
system, the Netscape.ad file is in /usr/doc/netscape-common-4.72.
Many times, however, an application's resource file resides in
/usr/X11R6/lib/X11/app-defaults/.  There are also several ways for
you to specify where your own custom app-defaults files live.

Kevin