Installing XFree86 to FHS/better locations

Mike A. Harris
Mon, 16 Feb 2004 01:31:11 -0500 (EST)

On Mon, 16 Feb 2004, Daniel Stone wrote:

>> My plan so far is to install fonts to /usr/share/fonts, docs to
>> /usr/share/doc, man pages to /usr/share/man. Haven't found a way to
>> install info stuff to /usr/share/info yet. Pondering binaries to
>> /usr/bin, libs to /usr/lib... thoughts? Mike Harris mentioned some
>> hardcoded paths in third-party apps, could use symlinks to
>> /usr/X11R6/{bin,lib} for compatibility.
>GO! GO! GO! GO!
>/usr/X11R6 is an anachronism that needs to die, IMO. Someone who isn't
>in any danger of a release (like Debian ;) needs to do it, tho, to root
>out any bugs. It's better to break them now and have the bugs reported
>than to just have them silently fester there.
>I'm considering doing a mass bug-finding and filing by virtue of a Perl
>script run against the entire Debian archive.

I agree quite largely.  /usr/X11R6 made some sense I believe back 
when it was initially created, however today's package management 
systems and OS distributions do not have the problems that the 
creation of /usr/X11R6 was intended to solve.  At least on Linux 
OSs anyway.  I'm not sure how other OSs would handle these type 
of changes, however there's no reason that different OS's can't 
handle it in the best way for that particular OS.

The only major problems I can forsee from moving stuff out of 
/usr/X11R6 into /usr are some legacy compatibility issues, in 
particular 3rd party applications which hard code things like 
/usr/X11R6/bin/xterm and other similiar things rather than just 
referencing the binary by name and letting standard PATH 
mechanics sort things out.

Documentation, fonts, and other "data" and config file stuff that 
hasn't already been moved out of the /usr/X11R6 hierarchy should 
be able to be moved with little to no pain.  I plan on doing this 
in Red Hat OS products in the near future also.

I believe the /usr/X11R6/bin and /usr/X11R6/lib directories can 
be safely moved to /usr/bin and /usr/lib respectively as long as 
there is a symbolic link pointing the legacy dirs to the ones in 
/usr, in order to maintain compatibility for some number of 
months/years until software is changed to use the standard dirs.

The parts of /usr/X11R6/lib/X11/* which are essentially
architecture independant 'data', should be moved instead to 
/usr/share somewhere.  Some of it, such as fonts, should be in 
/usr/share/fonts since there is nothing particularly X11 specific 
about fonts.  Architecture independant data files which are X11 
specific, should likely be in /usr/share/X11, and those which are 
implementation specific should probably reside in 

Config files that aren't already in /etc, should be.  Generally 
speaking, the FHS should be followed as it would be for other 
applications IMHO.

Someone pointed out that the FHS documents /usr/X11R6 also, and 
that moving things might violate the FHS.  I read the FHS clearly 
and carefully however, and while it says that the /usr/X11R6 
directory heirarchy is reserved for X11R6, it does not in any way 
*specify* that it _MUST_ be in that heirarchy.  It's unspecified 
enough IMHO, that moving X11 into /usr and putting compatibility 
symlinks where necessary is probably a fairly reasonable thing to 

>> To do that, the FONTDIR variable was defined at build time as xc/fonts
>> and at install time as /usr/share/fonts. ManDir and DocDir were
>> specified in host.def. BinDir/LibDir could be the same.
>> Mike suggested "#define SharedLibraryLoadFlags  -shared -Wl,-z,defs" to
>> make ld die at linking if undefined symbols exist.
>Yep, very good plan.

The final suggestion of SharedLibraryLoadFlags was unrelated to
the above discussion, just to be clear.  ;o)   I just spotted 
that in my host.def while passing on other host.def tidbits to 
Donnie in IRC, and thought I'd mention that one too.  ;o)

Take care,

Mike A. Harris
OS Systems Engineer - XFree86 maintainer - Red Hat