<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=gb2312"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:ËÎÌå;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:ËÎÌå;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@ËÎÌå";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
/* Page Definitions */
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I¡¯m building xorg in a local directory $HOME/xorg, then all libraries will go to $HOME/xorg/lib,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>And all the configure files will go to $HOME/xorg/share/X11/xorg.conf.d/, such as the 10-evdev.conf.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>My question is, when I run this local Xorg it will not search the configure file at the local configure directory:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>$HOME/xorg/share/X11/xorg.conf.d/<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Instead, it searches the system¡¯s xorg configuration file at:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/etc/X11/xorg.conf.d<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/usr/share/X11/xorg.conf.d<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>So you can see, when I run the new Xserver, it will load the old configuration files rather than the correct files<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Installed at local configuration directory.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I traced into the source code, and found the reason is as below:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>the macro SYS_CONFIGDIRPATH¡¯s defined as "/usr/share/X11/%X," "%D/X11/%X", <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>And it will be used to find the system config path. And the finding process is at function OpenConfigDir(), the finding mechanism<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>is to scan the SYS_CONFIGDIRPATH from left to right, and if it successfully find a directory, then it stop finding next. As my system has<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>a /usr/share/X11/xorg.conf.d, it stop to find the next path which is pointing to my local directory and which is the one should be<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>used here IMHO. As all the building process in my local building repository will install configuration files into local files rather than<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>the /usr/share/X11/xorg.conf.d.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I know there may be many duplicate config files in these two directories, so we have to pick one and discard the other one. In my<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>opinion, the local directory should be higher priority. Otherwise, how can we ensure we use the correct file when we build a new<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>xserver which has difference config files</span><span style='font-family:ËÎÌå'>£¿</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Any suggestion?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>