Path: utzoo!mnetor!uunet!wyse!weitek!sci!jimmc From: jimmc@sci.UUCP (Jim McBeath) Newsgroups: comp.windows.x Subject: Moving compiled X to another partition Message-ID: <19651@sci.UUCP> Date: 14 Apr 88 22:19:21 GMT Organization: Silicon Compilers Systems Corp. San Jose, Ca Lines: 52 For various reasons, we do two slightly unusual things with X here: 1) We load it onto a partition other than /usr. 2) After compiling it, we copy it to other machines onto a partition which is different from where it was built (and also not /usr). X11R2 has solved the first problem quite nicely; I was impressed with how easy it was to bring up in our non- standard location. All I had to do was modify the DESTDIR line in the *.macros file, and it all worked. My thanks to the X developers for doing a great job on that. My next problem is that, once built, it appears that I can not simply tar off the bin directory (etc.), move it to another partition, and have it run. I admit that I have not yet actually tried this, but it appears that there are a number of places in the code where paths are hard-coded and can not be changed with command line switches or environment variables. I have a simple proposal which I think would solve this second problem for me, and possibly make compiling X a little simpler as well. The proposal is to have a single global mechanism, readable at run time, which indicates where the root directory is onto which X has been installed. Here at SCS I use the environment variable XROOT to point to the root directory, which contains /usr/bin, /usr/lib, etc. In other words, XROOT is set to the same thing as DESTDIR in the *.macros file. Rather than having the DESTDIR part of the path compiled in, programs could look for the environment variable XROOT and prepend it to the default path. If XROOT is not set, then nothing is prepended to those default paths, and they end up referencing /usr/bin, /usr/lib, etc. We are running both X10 and X11 in a heterogenous system with NFS, so we have versions of X10 and X11 for Sun2, Sun3, Sun4, Vax, and (eventually) Apollo all under one root partition which is accessible from any of the machines. I have made modifications to X10R4 and X11R1 to support the XROOT mechanism, and it seems to work quite well. (I will probably go ahead and make the same changes to X11R2.) A user can select which version of X and which platform simply by changing one environment variable; we can use different paths to get to the software from different machines; and we can move the software to another machine or partition without having to recompile. I would be interested in hearing what others think of this proposal, and if there are any problems with it.