In article <1437@pivot-sts.sbi.com>, ray@rann.sbi.com (Raymond Blum) writes:
> In article 3310@contex.contex.com, avinash@felix.contex.com (Avinash Chopde) writes:
> >Is there any way to defeat the default X resource file search path?
> >It is extremely difficult to modify X programs if it involves changing
> >resource files---even if I keep a copy of the resource file in the
> >current directory, the default X mechanism *merges* all the resource file
> >it finds - from /usr/lib/app-defaults, from $XUSERFILESEARCHPATH,
> >..Xdefaults, and $XENVIRONMENT!
> >
> >Is it possible to force a X program to use only resource files in
> >the current directory, and inhibit this merging of resource files?
> >
> Why not have your program set the relevant environment variables BEFORE initializing X? You could set XENVIRONMENT to something along the lines of 'dirname `$0`'... couldn't you?
Yup, but that does not solve the problem - since X will still merge files
from the standard places.
Thanks to all the persons who sent in replies.
Here's the answer that works for me:
1) set XFILESEARCHPATH to some dummy directory, to defeat the
X manager from looking in /usr/lib/X11/app-defaults
2) If necessary, set XUSERFILESEARCHPATH (to dummy path or current
directory or whatever).
3) If necessary, set XENVIRONMENT.
4) If necessary, clear out .Xdefaults (load it with xrdb, etc).
Actually, all I need to do is in 1).
The manual I have (O Reilly Vol 4) does not mention that variable.
It works on my system, so I finally have a method to debug/maintain X
resource files....!
> ---Raymond
> >If this is not possible, how does a X developer maintain and debug
> >X resource files? (Edit the resource files in *all* the locations
> >on your system is an answer!)
> >--
--
---------------------------
Avinash Chopde office : 617 246 1776x5582 Wakefield, MA, USA.