[comp.windows.x] Resource defaultsx

swick@ATHENA.MIT.EDU (Ralph R. Swick) (10/03/88)

     Date:  30 Sep 88 19:04:22 GMT
     From:  kochhar@endor.harvard.edu  (Sandeep Kochhar)

     According to the manual for X11.2 that we have, it seems that
     we should be able to use ~/.Xdefaults to initialize resources
     (as in X10), e.g. xterm.background: red, in that file should
     produce all red xterms...  however, that's not the case.  

This issue has been dealt with before, but I suppose it's time to
repeat...

Under X11, most of the clients (and all those implemented using Xt,
which includes xterm) have hierarchies of windows, with corresponding
hierarchies of resources.  The syntax 'application.resource' is not
sufficient to specify resources for an entire hierarchy; it merely
specifies resources at the uppermost level.  Using '*' in place
of '.' indicates that the specification applies to multiple levels
of the hierarchy; see chapter 10, section 11 of the Xlib manual.
For most cases of X10 resources, '*' is an appropriate specification
in the majority of contexts and you are usually safe in doing a global
search-and-replace on an old X10 .Xdefaults file (on the left-hand
side of the ":" only!).  As a general rule, it's best to use '*'
by default and only use '.' when you have more directly knowledge
about the application (e.g. from it's man page).