Google Groups

Re: ~/.Xdefaults vs ~/.Xresources (FAQ item?)


Russell Shaw Aug 15, 2005 5:36 AM
Posted in group: comp.windows.x
David I. Schwartz wrote:
> hi all -- I after digging around and going in circles, I've decided to
> finally ask for help... how do Xdefaults and Xresources differ? I've
> seen people claim they're the same, and others claim that Xdefaults is
> outdated. Others say that Xresources gets accessed when starting the
> window manager, and Xdefaults gets accessed each time an X client is
> run. I suspect that various systems set things up differently, but
> perhaps there's a universal standard...?
>
> thanks,
> Dave

Xlib Programming Manual P.441

Prior to X11R2, X resource settings were read from .Xdefaults file
in users home directory and optionally on whatever machine the X client
was running on, so multiple files was hard to maintain.

Later on, xrdb program was made to store users resource settings from
in .Xresources into the XA_RESOURCE_MANAGER property of the root window
on the current X server, so all clients connected to the same server has
access to them. If the user hasn't called xrdb to set the property, then
.Xdefaults is read.