Next: Emacs ignores frame parameters, Previous: Errors with init files, Up: Bugs and problems [Contents][Index]

### 6.6 Why does Emacs ignore my X resources (my .Xdefaults file)?

As of version 19, Emacs searches for X resources in the files specified by the following environment variables:

- `XFILESEARCHPATH`
- `XUSERFILESEARCHPATH`
- `XAPPLRESDIR`

This emulates the functionality provided by programs written using the Xt toolkit.

`XFILESEARCHPATH` and `XUSERFILESEARCHPATH` should be a list of file names separated by colons. `XAPPLRESDIR` should be a list of directory names separated by colons.

Emacs searches for X resources:

1. specified on the command line, with the ‘`-xrm RESOURCESTRING`’ option,
2. then in the value of the ‘`XENVIRONMENT`’ environment variable,
   - - or if that is unset, in the file named `~/.Xdefaults-hostname` if it exists (where hostname is the name of the machine Emacs is running on),
3. then in the screen-specific and server-wide resource properties provided by the server,
   - - or if those properties are unset, in the file named `~/.Xdefaults` if it exists,
4. then in the files listed in ‘`XUSERFILESEARCHPATH`’,
   - - or in files named `lang/Emacs` in directories listed in ‘`XAPPLRESDIR`’ (where lang is the value of the `LANG` environment variable), if the ‘`LANG`’ environment variable is set,
   - - or in files named Emacs in the directories listed in ‘`XAPPLRESDIR`’
   - - or in `~/lang/Emacs` (if the `LANG` environment variable is set),
   - - or in `~/Emacs`,
5. then in the files listed in `XFILESEARCHPATH`.