Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!decwrl!sgi!mips!smsc.sony.com!dce From: dce@smsc.sony.com (David Elliott) Newsgroups: comp.windows.x Subject: Re: R5 wish Message-ID: <1991Jun5.145522.7599@smsc.sony.com> Date: 5 Jun 91 14:55:22 GMT References: <30242@hydra.gatech.EDU> <100920323@hpcvlx.cv.hp.com> Sender: dce@smsc.sony.com (David Elliott) Organization: Sony Microsystems, San Jose, CA Lines: 46 In article , tot@frend.fi (Teemu Torma) writes: |> In article <1991Jun04.133705.15431@convex.com> gstiehl@convex.convex.COM (Greg Stiehl) writes: |> |> This does have one problem. X want to find things (like app-defaults) in |> /usr/lib/X11. This can be changed at compile time, but (as far as I know) |> it can't be changed at run time. It would be trivial to add a XLIBDIR |> environment variable that could also be set to /usr/X11/lib. If fact, |> the best thing would be to have a XLIBDIRPATH, that could be set to |> a number of directories (separated by colons). |> |> There is an environment variable XFILESEARCHPATH. Set it to |> XLIBDIR/%T/%N%S and it does the trick. The default for XFILESEARCHPATH is /usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S Teemu's trick works fine if you only support one locale, though. In addition, there's a variable called XUSERFILESEARCHPATH, which defaults to a really messy string which is slightly messier if you have XAPPLRESDIR set. Still, having to set these environment variables is a real mess for an end-user, and we don't always have control over the environment. At best, an application programmer can concatenate things onto the ends of these variables to try to get things right, but even that is a mess. As for other files that are used by the program, the best way to handle these is through the use of resources. This allows for debugging (set the resource to the source directory) and for special installations. It's very easy to do once you get the hang of it. One thing I would like to see is something along the lines of a {class}.local file which would be merged with the contents of the app-defaults file (and take precedence). That way, I can use the distributed app-defaults file provided by the software vendor without modification, but still add in system-specific information (kind of like site.def in the X config directory). -- ...David Elliott ...dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce ...(408)944-4073 ..."Art is never fair" - paa