Official method for determining modular X module path?

Aric Cyr Aric.Cyr at gmail.com
Thu Dec 1 00:42:18 PST 2005


Daniel Stone <daniel <at> freedesktop.org> writes:

> 
> On Wed, Nov 30, 2005 at 03:42:26PM -0800, Andy Ritger wrote:
> > The installer for the next NVIDIA Linux driver release will run
> > the above command; if that is successful and returns a directory
> > that exists, it will be used, otherwise the NVIDIA installer will
> > fall back to /usr/X11R6/lib/modules.
> > 
> > Is that the proper heuristic to use?
> 
> Err.  Surely something like the above:
> MODULEDIR="$(pkg-config --variable=moduledir xorg-server)"
> if [ -z "$MODULEDIR" ]; then
>     MODULEDIR="/usr/lib/xorg/modules"
> fi
> if [ ! -d "$MODULEDIR" ] && [ ! -L "$MODULEDIR" ]; then
>     MODULEDIR="/usr/X11R6/lib/modules"
> fi

Is /usr/lib/xorg/ spec'ed out somewhere to be the defacto
location for the modules directory?  Seems like Gentoo and Ubuntu
agree that it is the right spot, but if other distros don't know that
your above heuristic would fail if neither of those locations were
valid.  This is the sort of info that should be (at least) in the wiki,
if it's not already.  I couldn't find any relevant docs on the issue
from a quick search (other than a #define in a header file that obviously
defined the default module path as /usr/lib/xorg/modules).

- Aric




More information about the xorg mailing list