Quote:
Originally Posted by Oko
I think this is pretty good answer somebody posted on superuser
Code:
~/.Xdefaults is the older method of storing X resources. This file is re-read every time an Xlib program is started. If X11 is used over the network, the file must be present on the same filesystem as the programs.
~/.Xresources is newer. It is loaded with xrdb into the RESOURCE_MANAGER property of the X11 root window. Whenever any program looks up a resource, it is read straight from RESOURCE_MANAGER.
If this property does not exist, Xlib falls back to the old method of reading .Xdefaults on every program startup. Note that most distributions will load ~/.Xresources automatically if it is present, causing .Xdefaults to be ignored even if you have never run xrdb manually.
The advantage of the new method is that it's enough to call xrdb once, and the resources will be available to any program running on this display, whether local or remote. (The name ~/.Xresources is only a convention – you can use xrdb to load any file, even .Xdefaults.)
I personally have both files but they are identical
|
On my system, they behave the same. If I modify ~/.Xdefaults and start a new xterm the settings do *not* take effect. I need to do xrdb ~/.Xdefaults first.
However, if I do
strace xterm (Linux), I get:
Code:
open("/home/martin/.Xdefaults-martin-xps.lico.nl", O_RDONLY) = -1 ENOENT (No such file or directory)
martin-xps.lico.nl is my machine's hostname.
I see no sign of either ~/.Xdefaults or ~/.Xresources
When I create this file, I get:
Code:
open("/home/martin/.Xdefaults-martin-xps.lico.nl", O_RDONLY) = 4
And these settings immediately take effect (and override my ~/.Xdefaults that I loaded with xrdb).