Any tutorial on the mysteries of .Xresources file?

Charles philip Chan cpchan-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org
Sat Nov 5 15:45:36 UTC 2005


On  5 Nov 2005, nobrowser-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org wrote:

> .Xdefaults is read directly by the app, it is basically just another
> config file format, like ~/.*rc files.  .Xresources, OTOH, is read by
> the X server when the X session starts, and then the app queries the
> server for the settings using the X protocol.

Yes, this true. Here is an excerpt from the X manpage:

,----[ Excerpt from the Manpage for X ]
| This must point  to  a  file  containing  X  resources.  The  default is
| $HOME/.Xdefaults-<hostname>. Unlike /usr/X11R6/lib/X11/Xresources, it
| is consulted each time an X application starts.
`----

> This distinction is important when you use X remotely (then the files
> are on different machines).

According to the X manpage host specific resources should really go in
to ~/.Xdefaults-<hostname> instead. Here is an excerpt from the manpage
for X:

,----[ Excerpt from the Manpage for X ]
| Any user- and machine-specific resources may be specified by setting the
| XENVIRONMENT environment variable to the name of a resource file to be
| loaded by all applications.  If this variable is not defined, a file
| named $HOME/.Xdefaults-hostname is looked for instead, where hostname is
| the name of the host where the application is executing.
`----

> But the particular case of font settings is (slowly?) going away as xft
> fonts take over.

Not only just fonts. Most modern X apps (e.g. gtk and qt based) don't
even use ~/.Xdefaults and ~/.Xresources for settings.

Charles

-- 
"The move was on to 'Free the Lizard'"

  -- Jim Hamerly and Tom Paquin (Open Sources, 1999 O'Reilly and Associates)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gtalug.org/pipermail/legacy/attachments/20051105/92638438/attachment.sig>


More information about the Legacy mailing list