[comp.windows.x] Proper handling of locally-installed software

dce@smsc.sony.com (David Elliott) (06/08/90)

One of my jobs is to snag all of the wonderful contributed and
posted software, and place it in our shared /usr/local/bin
directories.

Now that lots more people are writing Xt programs and supplying
app-defaults files, I want to be able to put these in
/usr/local/lib/app-defaults, which can be shared.  For now, this means
having every user set XUSERFILESEARCHPATH, which isn't always
acceptable (it's tough enough to get people to put /usr/local/bin in
their paths).

Is there a way to set up Xt so that it will look in both /usr/lib/X11
and /usr/local/lib without forcing each user to do something special?
Would it be acceptable to make this a standard part of Xt?

-- 
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"If I had a hat the size of Oklahoma, I'd be a happy person."

bob@MorningStar.Com (Bob Sutterfield) (06/08/90)

In article <1990Jun7.171528.4968@smsc.sony.com> dce@smsc.sony.com (David Elliott) writes:
   ...For now, this means having every user set XUSERFILESEARCHPATH,
   which isn't always acceptable (it's tough enough to get people to
   put /usr/local/bin in their paths)...  Is there a way to set up Xt
   so that it will look in both /usr/lib/X11 and /usr/local/lib
   without forcing each user to do something special?

From expo.lcs.mit.edu:pub/R4/ERRATA, dated Jan 19 10:17:

2.  If you are trying to install library files into a directory other than
    /usr/lib/X11, you'll need to change XFILESEARCHPATHDEFAULT and ERRORDB
    in the file mit/lib/Xt/IntrinsicI.h to point at the correct directories.
    You'll also need to change SYSTEM_INIT_FILE in mit/clients/twm/parse.c.
    You'll also need to add the following line to mit/lib/Xmu/Imakefile:

	DEFINES = -DBITMAPDIR=\"$(INCDIR)/bitmaps\"

Though it may be overkill, my IntrinsicI.h looks like:

/* used by XtResolvePathname */
#ifndef XFILESEARCHPATHDEFAULT
#define XFILESEARCHPATHDEFAULT "/usr/local/lib/X11/%L/%T/%N%S:/usr/local/lib/X11/%l/%T/%N%S:/usr/local/lib/X11/%T/%N%S:/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S"
#endif