Bug 50867

Summary: Xresources and Xdefaults
Product: [Retired] Red Hat Linux Reporter: Michal Jaegermann <michal>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-03 22:19:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2001-08-04 02:17:59 UTC
Description of Problem:

/etc/X11/xdm/Xsession loads various applications defaults from
/etc/X11/xinit/Xresources (which is a change by itself as 7.1
was using /etc/X11/Xresources, and I failed to notice anywhere a warning
that this will happen but maybe I was not observant enough) and
from $HOME/.Xresources.  This is fine and dandy with this exception
that current versions of 'rxvt' seem to be just looking at
$HOME/.Xdefaults and they do not even run that through preprocessor,
like 'xrdb -load ...', or 'xrdb -merge', would do but read that "as is".
Whatever 'xrdb -query' shows for rxvt is totally disregarded.

This could be even construed as a "feature" if not that small detail that
this grows a number of "dot-files" (well, 'rxvt' will look at
$HOME/.Xresources  but only if $HOME/.Xdefaults is absent) and is not
really documented that way.  OTOH 'strace' does not seem to indicate that
a consultation with /usr/lib/X11/app-defaults/Rxvt is even attempted
man-page claims to the contrary.

This is a "feature" because in $HOME/.Xresources one can use preprocessor
macros for various purposes and leave $HOME/.Xdefaults for the sole use
of 'rxvt' but I am not sure if this was really intended. :-)

Comment 1 Harald Hoyer 2001-12-14 15:38:19 UTC
you may try rxvt-2.7.8-1



Comment 2 Michal Jaegermann 2001-12-15 00:14:30 UTC
Hm, kind of difficult to do that.  The last one I see in rawhide is
rxvt-2.7.6-4 (or there are many, out of sync, rawhide depositories 
or I should look for it somewhere else?).

Comment 3 Jay Turner 2002-04-02 17:15:10 UTC
What's the latest status of this?

Comment 4 Michal Jaegermann 2002-04-02 17:55:41 UTC
'rxvt' from "skipjack", i.e. rxvt-2.7.8-3, will still read and try to
interpret ~/.Xdefaults directly (just use strace to see that), which may
be not the greatest thing if this was meant to be preprocessed first,
but at least it pays attention what is provided by xrdb.

If ~/.Xdefaults is missing then it is pretty insistent on trying to open
it or ~/.Xdefaults-<host_name>.  My strace shows 504 such attempts. :-)
OTOH, contrary to what manpage says in RESOURCES section, a presence of
~/.Xresources file is totally ignored.

Comment 5 Harald Hoyer 2002-04-03 07:48:42 UTC
The is XGetDefault() from the X11 library, which tries to open those files.

Comment 6 Michal Jaegermann 2002-04-03 15:40:05 UTC
Oh, I should add that with rxvt-2.7.8-3 defaults from
/usr/lib/X11/app-defaults/Rxvt seem to be actually used
in a contrast to an older version from the original report.

Comment 7 Mike A. Harris 2002-04-03 22:19:54 UTC
Xresources and .Xresources are the official locations in XFree86 4.x.
Anything using .Xdefaults should be changed to use Xresources.  Any backward
compatiibility hacks that are in place by upstream will remain in place,
however it is entirely possible upstream may change this, so Xresources
shoulds be migrated to.

Comment 8 Mike A. Harris 2002-11-01 06:48:54 UTC
Actually....  my bad.

Upstream _did_ change this - 2 years ago.  .Xdefaults died over 2 years
ago and we kept it around for legacy compatibility for a while.  It is
gone now.

Closing NOTABUG