[comp.windows.x] Toolkit is not reading my resource file

davis@rm1.UUCP (Gary A. Davis) (05/26/90)

Reference: Decwindows

According to my doc on the XtInitialize intrinsic (which calls
XtDisplayInitialize), there are several steps in the loading of the
resource database:

	1. /usr/lib/X11/app-defaults/xxx
	2. XAPPLRESDIR environment variable points to a user directory
	3. ~/.Xdefaults
	4. XENVIRONMENT env var points to a host directory (or
	   ~/.Xdefaults-host  [replace "host" with the host name]
	5. Command line

I am having problems with item 2. This is supposed to be a directory
of files named by the application class name. It was being ignored.

I looked at the source code for the intrinsic and  it was obvious that
it didn't do anything with XAPPLRESDIR. In its place, it built a
filename consisting of the home directory, a dot and then the
class name. 

I created the file as ~/.Appl and it worked. Which way is it supposed
to be? The way it was documented or the way it was implemented?

-- 
  Gary A. Davis
  Racal-Milgo, P.O. Box 407044, Fort Lauderdale, Fl 33340, (305) 846-4393

  mailrus!uflorida!novavax!rm1!davis

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (05/29/90)

    I looked at the source code for the intrinsic and  it was obvious that
    it didn't do anything with XAPPLRESDIR. In its place, it built a
    filename consisting of the home directory, a dot and then the
    class name.

The R3 Intrinsics specified approximately this behaviour: it did not
specify that a dot should be inserted.  The MIT R3 implementation followed
the specification, and I believe the XUI documentation matched R3, but
the XUI implementation inserted the dot.  The XUI implementation is
incorrect.

Note that the R4 Intrinsics have generalized this lookup mechanism.

ron@xwind.UUCP (Ronald P. Hughes) (05/30/90)

In article <862@rm1.UUCP> davis@rm1.UUCP (Gary A. Davis) writes:
>According to my doc on the XtInitialize intrinsic (which calls
>XtDisplayInitialize), there are several steps in the loading of the
>resource database:
>
...
>	2. XAPPLRESDIR environment variable points to a user directory
...
>I am having problems with item 2. This is supposed to be a directory
>of files named by the application class name. It was being ignored.

Try it with a trailing slash (e.g., "/usr/wherever/myresdir/")
>----------------------------------------------------------^
It works for me.

Ronald P. Hughes		ron@xwind.com  (or ...!uunet!xwind!ron)
CrossWind Technologies, Inc.	408-335-4988

victoria@pivot.UUCP (Victoria Drozdov) (06/01/90)

In article <392@xwind.UUCP>, ron@xwind.UUCP (Ronald P. Hughes) writes:
> >
> ...
> >	2. XAPPLRESDIR environment variable points to a user directory
> ...
> >I am having problems with item 2. This is supposed to be a directory
> >of files named by the application class name. It was being ignored.
> 
> Try it with a trailing slash (e.g., "/usr/wherever/myresdir/")
> >----------------------------------------------------------^
> It works for me.
> 


How do I include more than one directory under XAPPLRESDIR?

I have tried the following format, which did not work:

	setenv XAPPLRESDIR /usr/lib/X11/app-defaults/:/usr/lib/X11R4/app-defaults/

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (06/01/90)

    How do I include more than one directory under XAPPLRESDIR?

You can't.  If you have an R3-based system, you're stuck.  In R4,
XUSERFILESEARCHPATH supercedes XAPPLRESDIR to give you this.