[505] in Release_7.7_team

home help back first fref pref prev next nref lref last post

Use of XAPPLRESDIR, XUSERFILESEARCHPATH, etc. on Athena

daemon@ATHENA.MIT.EDU (Craig Fields)
Wed Apr 24 23:16:59 1996

Date: Wed, 24 Apr 96 23:16:52 -0400
From: Craig Fields <cfields@MIT.EDU>
To: f_l@MIT.EDU, release-team@MIT.EDU, bug-sipb@MIT.EDU
Cc: miki@MIT.EDU

(If you don't care why we decided what we decided, skip to the ---.)

It came out a few weeks ago that setting XUSERFILESEARCHPATH so that
Athena software can find its app-defaults files causes things in
lockers which use XAPPLRESDIR to break.

Investigation shows that:

	Solaris software finds its app-defaults by using XFILESEARCHPATH.

	Irix software finds its app-defaults by using XUSERFILESEARCHPATH.

	XFILESEARCHPATH can be used to find bitmap files and other
	miscellaneous data in addition to app-defaults.

	XUSERFILESEARCHPATH is specifically intended for locating
	app-defaults, and doesn't apply to anything else. Furthermore,
	its use supersedes and overrides XAPPLRESDIR.

While using XFILESEARCHPATH to find Athena software app-defaults would
work and not break software which uses XAPPLRESDIR, doing so would be
less efficient. The continued use of XAPPLRESDIR in lockers would be
antiquated and incompatible with the fact that Irix already uses
XUSERFILESEARCHPATH. [XUSERFILESEARCHPATH has been around since
X11R4.] Therefore, Athena software will use XUSERFILESEARCHPATH to
find its app-defaults, forcing locker software which currently uses
XAPPLRESDIR to update to using the more modern XUSERFILESEARCHPATH
itself.

---

The upshot is, software which uses XAPPLRESDIR currently should
migrate to using XUSERFILESEARCHPATH. This has been necessary under
Irix from the beginning; as of Solaris 2.4 in Athena Release 8.0, it
will become necessary also on that platform. For example, a C shell
which once said

setenv XAPPLRESDIR /mit/foo/app-defaults/

should now say something like

if ((! $?XUSERFILESEARCHPATH)) then
  setenv XUSERFILESEARCHPATH "/mit/foo/app-defaults/%N"
else
  setenv XUSERFILESEARCHPATH "${XUSERFILESEARCHPATH}:/mit/foo/app-defaults/%N"
endif

Or, Bourne shell,

XAPPLRESDIR=/mit/foo/app-defaults/
export XAPPLRESDIR

should now say something like

XUSERFILESEARCHPATH=$XUSERFILESEARCHPATH${XUSERFILESEARCHPATH:+:}/mit/foo/app-defaults/%N
export XUSERFILESEARCHPATH

In English, if XUSERFILESEARCHPATH wasn't already set, set it to just
/mit/foo/app-defaults/%N. If it already had a value, append a : and
then the /mit/foo path.

If your locker supersedes something already on the packs (?), you
would probably need to put your path element first rather than
appending it, but otherwise, please don't do this.

Substituting XUSERFILESEARCHPATH for XAPPLRESDIR should work on all
platforms, so the substitution doesn't need to be done only for Irix
and Solaris. But you should be paranoid and test it anyway.

I hope this message was not incomprehensible.

Questions to me...

Craig Fields
MIT IS/Athena
cfields@mit.edu


home help back first fref pref prev next nref lref last post