glfs/x/installing/xfree86/xfree86-config.xml
Tushar Teredesai 8d94e41537 Added PKG_CONFIG_PATH note to XFree86
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1756 af4574ff-66df-0310-9fd7-8a98e5e911e0
2004-02-01 17:34:17 +00:00

116 lines
4.9 KiB
XML

<sect2>
<title>Configuring <application>XFree86</application></title>
<para>Edit <filename>/etc/ld.so.conf</filename> and add
<filename class="directory">/usr/X11R6/lib</filename>.
Run</para> <screen><userinput><command>ldconfig</command></userinput></screen>
<para>Add <filename class='directory'>/usr/X11R6/bin</filename> to your
<envar>PATH</envar> environment
variable in <filename>.bash_profile</filename>. The statement should
look something like <parameter>PATH=$PATH:/usr/X11R6/bin</parameter>
and be placed before the <command>export PATH</command>
statement.</para>
<para>Expand the <envar>PKG_CONFIG_PATH</envar> so that other packages
can find <application>XFree86</application> libraries. Add the following line to
<filename>.bash_profile</filename> for root user:</para>
<screen><userinput><command>export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig</command></userinput></screen>
<para>Run</para>
<screen><userinput><command>source ~/.bash_profile</command></userinput></screen>
<para>Set up your mouse:
<screen><userinput><command>cd /dev
ln -s psaux mouse</command></userinput></screen>
Adjust the symbolic link as necessary for other types of mice. For instance,
a serial mouse on the first serial port would be linked to ttyS1.</para>
<para>Create the <filename>XF86Config</filename> file with
<screen><userinput><command>cd ~
XFree86 -configure</command></userinput></screen>
The screen will go black and you may hear some clicking of the monitor. This
command will create a file, <filename>XF86Config.new</filename> in your home
directory.</para>
<para>Edit <filename>XF86Config.new</filename> to suit your system. The
details of the file are located in the man
page <command>man XF86Config</command>. Some things you may want to
do are:</para>
<itemizedlist>
<listitem><para>Section "Files". Change the order of the font paths searched.
You may want to put 100dpi fonts ahead of 75dpi fonts if your system normally
comes up closer to 100 dots per inch. You may want to remove some font
directories completely.</para></listitem>
<listitem><para>Section "Monitor". Specify the <parameter>VertRefresh</parameter>
and <parameter>HorizSync</parameter> values if the system does not automatically
detect the monitor and its values.</para></listitem>
<listitem><para>Section "InputDevice". You may want to change the keyboard
autorepeat rate by
adding <parameter>Option "Autorepeat" "250 30"</parameter>.</para></listitem>
<listitem><para>Section "Device". You may want to set some of the options
available for your selected video driver. A description of the driver
parameters is in the man page for your driver.</para></listitem>
<listitem><para>Section "Screen". Add a DefaultDepth statement such
as: <parameter>DefaultDepth 16</parameter>. In the SubSection for your
default depth, add a modes line such
as: <parameter> Modes "1280x1024" "1024x768"</parameter>.
The first mode listed will normally be the starting
resolution.</para></listitem>
</itemizedlist>
<para>Test the system with
<screen><userinput><command>XFree86 -xf86config ~/XF86Config.new</command></userinput></screen>
You will only get a gray background with an X-shaped mouse cursor, but it
confirms the system is working. Exit with Control-Alt-Backspace. If the
system does not work, take a look
at <filename>/var/log/XFree86.0.log</filename> to see what went
wrong.</para>
<para>Move the configuration file to its final location</para>
<screen><userinput><command>mv ~/XF86Config.new /etc/X11/XF86Config</command></userinput></screen>
<para>Create <filename>.xinitrc</filename>
<screen><userinput><command>cat &gt; ~/.xinitrc &lt;&lt; "EOF"</command>
# Begin .xinitrc file
xterm -g 80x40+0+0 &amp;
xclock -g 100x100-0+0 &amp;
twm
<command>EOF</command></userinput></screen>
This provides an initial screen with an xterm and a clock that is managed by a
simple window manager, Tab Window Manager. For details of twm, see the
man page.</para>
<note>
<para>When starting up, <application>XFree86</application> creates the directory
<filename>/tmp/.ICE-unix</filename> if it does not exist. If this directory is
not owned by root, <application>XFree86</application> delays startup by a few seconds
and also appends a warning to the logfile. This also affects startup of other
applications. To improve performance, perform the following steps as root before
starting <application>XFree86</application> for the first time. Additionally, if you
use tmpfs or clean out all the files in <filename>/tmp</filename> when you boot,
we recommend adding the same instructions to the end of your
<filename>/etc/rc.d/init.d/cleanfs</filename> startup script.</para>
<screen><userinput>rm -rf /tmp/.ICE-unix &amp;&amp;
mkdir /tmp/.ICE-unix &amp;&amp;
chmod 1777 /tmp/.ICE-unix</userinput></screen>
</note>
<para>Start <application>X</application> with
<screen><userinput><command>startx</command></userinput></screen>
to get basic functional <application>X</application> Window System.</para>
</sect2>