[579] in Release_7.7_team

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

Re: Use of XAPPLRESDIR, XUSERFILESEARCHPATH, etc. on Athena

daemon@ATHENA.MIT.EDU (Reid M. Pinchback)
Tue Jun 11 14:20:54 1996

To: Craig Fields <cfields@MIT.EDU>
Cc: release-team@MIT.EDU, bug-sipb@MIT.EDU, miki@MIT.EDU, dot@MIT.EDU,
        dupuis@MIT.EDU, alexp@MIT.EDU
In-Reply-To: Your message of Wed, 24 Apr 1996 23:16:52 -0400.
             <9604250316.AA03679@mad-scientist.MIT.EDU> 
Date: Tue, 11 Jun 1996 14:20:37 EDT
From: "Reid M. Pinchback" <reidmp@MIT.EDU>


On Apr 24 (yes, it took me a while to get to this) Craig wrote:
!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.
...
!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
...
!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.

Since this was something I had to check out for the Maple startup
scripts, what I found was that this worked except on the
DECstation. The ":+" feature isn't available on DEC Ultrix.  I suspect
it has something to do with whether or not the Bourne shell is SysV
derived or BSD derived, but that is just a guess on my part.  Here is
what appears to work on all platforms:

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

In other words, if the variable is set, modify it (else do nothing).
Then, if the variable *still* isn't set, set it.

===============================================================
= Reid M. Pinchback                                           =
= Senior Faculty Liaison                                      =
= Academic Computing Services, MIT                            =
=                                                             =
= Email:   reidmp@mit.edu                                     =
= URL:     http://web.mit.edu/reidmp/www/home.html            =
===============================================================

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