glfs/x/installing/xfree86/xfree86-config.xml
Igor Živković 6aac02ebf4 fixed xfree86 symlinks
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2005 af4574ff-66df-0310-9fd7-8a98e5e911e0
2004-04-17 21:09:48 +00:00

114 lines
4.8 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>ln -s psaux /dev/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 needed, <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, it is advisable to manually create the directory
before XFree86 uses it. Add the file creation to <filename>/etc/sysconfig/createfiles</filename>
that is sourced by the
<filename>/etc/rc.d/init.d/cleanfs</filename> startup script.</para>
<screen><userinput><command>cat &gt;&gt; /etc/sysconfig/createfiles &lt;&lt; "EOF"</command>
/tmp/.ICE-unix dir 1777 root root
<command>EOF</command></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>