[Techtalk] emacs

Akkana akkana at shallowsky.com
Sat Nov 3 11:48:32 EST 2001


Raven Brooke writes:
> Thanks, this worked beautifully! It was very frustrating to have the 
> values I wanted in my .Xresources ignored by emacs. I did actually log out 
> and restart x, don't know why that didn't work, but the xrdb sure did  : )

It might be that your X startup isn't reading .Xresources.

Here's what happens: xinit looks for the system startup file, probably
something under /usr/lib/X11/xinit.  On my redhat 7.1 system, that
contains a file called xinitrc which does a buncha stuff including loading
~/.Xresources, then looks for a ~/.Xclients and runs it, or if you
don't have one, it calls /etc/X11/xinit/Xclients instead.
(Other distros may work a little differently.)  I think you can
have either a .xinitrc in your home directory (which would override
the system's xinitrc) or a .Xclients (which is run by the system
.xinitrc instead of the built-in one, but then you still get the
system's xinitrc).  But that seems to vary from release to release.

Also varying from version to version is whether the system file looks
for .Xresources or .Xdefaults.  I currently have .Xdefaults whereas
the system xinitrc only looks for .Xresources, and I'm not currently
doing an xrdb -l $HOME/.Xdefaults in my .Xclients, yet my settings are
working, which means that the path I described in the previous paragraph
isn't complete and I'm missing something. :-)

But the upshot is: if neither .Xresources nor .Xdefaults seems to
be loaded when you start X, check whether you have a .xinitrc or
.Xclients that might be overriding the system file which would have
been doing the xrdb for you.  Or just add the xrdb command to your
own file.

> The FILESEARCHPATH is something I found in a FAQ describing where emacs 
> looks for .Xresources, I thought perhaps it wasn't finding the file 
> because it wasn't in the PATH emacs was searching.

Some clients actually do look for ~/.Xdefaults or ~/.Xresources and
read and parse them directly (sometimes this is a compile-time option,
which may or may not be switched on in the version you're using),
but it's best not to rely on that and make sure it gets into the
X resource database.

	...Akkana




More information about the Techtalk mailing list