Date: Tue, 8 Oct 2013 21:38:25 +0000 (UTC) From: Dru Lavigne <dru@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r42905 - head/en_US.ISO8859-1/books/handbook/x11 Message-ID: <201310082138.r98LcPdW082358@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dru Date: Tue Oct 8 21:38:24 2013 New Revision: 42905 URL: http://svnweb.freebsd.org/changeset/doc/42905 Log: This patch does the following: - adds pkg instructions to 6.3. Installing Xorg - adds a Caveats section to 6.4. Xorg Configuration - temporarily moves the extra config stuff to a new section called 6.8. Troubleshooting--this text has not yet been reviewed and this section may end up being instead called 6.8. Advanced Configuration or shuffled elsewhere in a subsequent patch - replaces instances of X and X11 with the entity for xorg - some updates to Synopsis, there will be more updates as the chapter is reviewed and shuffled Approved by: bcr (mentor) Modified: head/en_US.ISO8859-1/books/handbook/x11/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/x11/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/x11/chapter.xml Tue Oct 8 21:32:37 2013 (r42904) +++ head/en_US.ISO8859-1/books/handbook/x11/chapter.xml Tue Oct 8 21:38:24 2013 (r42905) @@ -7,7 +7,7 @@ <chapter id="x11"> <chapterinfo> - <authorgroup> + <!--<authorgroup> <author> <firstname>Ken</firstname> <surname>Tom</surname> @@ -17,7 +17,7 @@ <firstname>Marc</firstname> <surname>Fonvieille</surname> </author> - </authorgroup> + </authorgroup>--> </chapterinfo> <title>The X Window System</title> @@ -25,19 +25,25 @@ <sect1 id="x11-synopsis"> <title>Synopsis</title> - <para>FreeBSD uses X11 to provide users with - a powerful graphical user interface. X11 - is a freely available version of the X Window System that - is implemented in <application>&xorg;</application> - (and other software packages not discussed here). The - default and official flavor of X11 in &os; is - <application>&xorg;</application>, the X11 server developed by - the X.Org Foundation under a license very similar to the one - used by &os;.</para> - - <para>For more information on the video hardware that X11 - supports, check the - <ulink url="http://www.x.org/">&xorg;</ulink> web site.</para> + <para>An installation of &os; using + <application>bsdinstall</application> does not automatically + install a graphical user interface. This chapter describes + how to install and configure <application>&xorg;</application>, + which provides the open source X Window System used to provide + a graphical environment. It then describes how to find and + install a desktop environment or window manager.</para> + + <note> + <para>Users who prefer an installation method that automatically + configures the <application>&xorg;</application> and offers + a choice of window managers during installation should + refer to the <ulink + url="http://www.pcbsd.org/">pcbsd.org</ulink> website.</para> + </note> + + <para>For more information on the video hardware that <application>&xorg;</application> + supports, refer to the + <ulink url="http://www.x.org/">x.org</ulink> website.</para> <para>After reading this chapter, you will know:</para> @@ -48,15 +54,16 @@ </listitem> <listitem> - <para>How to install and configure X11.</para> + <para>How to install and configure <application>&xorg;</application>.</para> </listitem> <listitem> - <para>How to install and use different window managers.</para> + <para>How to install and configure several window managers + and desktop environments.</para> </listitem> <listitem> - <para>How to use &truetype; fonts in X11.</para> + <para>How to use &truetype; fonts in <application>&xorg;</application>.</para> </listitem> <listitem> @@ -70,7 +77,7 @@ <itemizedlist> <listitem> <para>Know how to install additional third-party - software (<xref linkend="ports"/>).</para> + software as described in <xref linkend="ports"/>.</para> </listitem> </itemizedlist> </sect1> @@ -224,16 +231,20 @@ </sect1> <sect1 id="x-install"> - <title>Installing X11</title> + <title>Installing <application>&xorg;</application></title> - <para><application>&xorg;</application> is the X11 - implementation for &os;. <application>&xorg;</application> - is the X server of the open source X Window System - implementation released by the X.Org Foundation. - <application>&xorg;</application> is based on the code of - <application>&xfree86; 4.4RC2</application> and X11R6.6. - The version of <application>&xorg;</application> currently - available in the &os; Ports Collection is &xorg.version;.</para> + <para><application>&xorg;</application> is the + implementation of the open source X Window System + released by the X.Org Foundation. In &os;, it + can be installed as a package or port. The meta-port for the + complete distribution which includes X servers, clients, + libraries, and fonts is located in <filename + role="package">x11/xorg</filename>. A minimal distribution + is located in <filename + role="package">x11/xorg-minimal</filename>, with separate + ports available for docs, libraries, and apps. + The examples in this section install the complete + <application>&xorg;</application> distribution.</para> <para>To build and install <application>&xorg;</application> from the Ports Collection:</para> @@ -243,57 +254,38 @@ <note> <para>To build <application>&xorg;</application> in its - entirety, be sure to have at least 4 GB of free space + entirety, be sure to have at least 4 GB of free disk space available.</para> </note> - <para>Alternatively, X11 can be installed directly from packages. - Binary packages to use with &man.pkg.add.1; tool are also - available for X11. When the remote fetching feature of - &man.pkg.add.1; is used, the version number of the package must - be removed. &man.pkg.add.1; will automatically fetch the latest - version of the application.</para> - - <para>So to fetch and install the package of - <application>&xorg;</application>, simply type:</para> + <para>Alternatively, <application>&xorg;</application> can be installed directly from packages. + To install the package using + <application>pkg_add</application>, type:</para> <screen>&prompt.root; <userinput>pkg_add -r xorg</userinput></screen> - <note> - <para>The examples above will install the complete X11 - distribution including the servers, clients, fonts etc. - Separate packages and ports of X11 are also available.</para> - - <para>To install a minimal X11 distribution you can - alternatively install - <filename role="package">x11/xorg-minimal</filename>.</para> - </note> + <para>To instead install the package using + <application>pkg</application>, type:</para> - <para>The rest of this chapter will explain how to configure - X11, and how to set up a productive desktop - environment.</para> + <screen>&prompt.root; <userinput>pkg install xorg</userinput></screen> </sect1> <sect1 id="x-config"> <sect1info> - <authorgroup> + <!--<authorgroup> <author> <firstname>Christopher</firstname> <surname>Shumway</surname> - <contrib>Contributed by </contrib> - <!-- July 2001 --> + <contrib>Contributed in July 2001 by</contrib> </author> - </authorgroup> + </authorgroup>--> </sect1info> - <title>X11 Configuration</title> + <title><application>&xorg;</application> Configuration</title> <indexterm><primary>&xorg;</primary></indexterm> - <indexterm><primary>X11</primary></indexterm> - - <sect2> - <title>Before Starting</title> + <indexterm><primary><application>&xorg;</application></primary></indexterm> - <para>In most cases, X11 is self-configuring. Those with older + <para>In most cases, <application>&xorg;</application> is self-configuring. Those with older or unusual equipment may find it helpful to gather some hardware information before beginning configuration.</para> @@ -342,68 +334,84 @@ <para>Video card memory determines the maximum resolution and color depth which can be displayed.</para> - </sect2> + + <sect2> + <title>Caveats</title> + + <para>The ability to configure optimal resolution is dependent + upon the video hardware and the + support provided by its driver. + At this time, driver support is as follows:</para> + + <itemizedlist> + <listitem> + <para>NVIDIA: several NVIDIA drivers are available in the + x11 category of the FreeBSD Ports Collection. Install + the driver that matches the model of the NVIDIA + hardware.</para> + </listitem> + + <listitem> + <para>Intel: as of FreeBSD 9.1, 3D acceleration on most + Intel graphics, including IronLake, SandyBridge, and + IvyBridge, is supported. Due to the current KMS + implementation, it is not possible to switch between the + graphical console and a virtual console using + Crtl+Alt+F#.</para> + </listitem> + + <listitem> + <para>ATI/Radeon: 3D acceleration will not work on ATI or + Radeon cards until FreeBSD completes its TTM work. These + cards will need to be configured with the 2D driver, and + if that does not work, with the Vesa driver.</para> + </listitem> + + <listitem> + <para>Optimus: currently there is no switching support + between the two graphics adapters provided by Optimus. + Optimus implementations vary, so FreeBSD may or may not + be able to successfully load a graphics driver on all + hardware. If you get a blank screen, check if the BIOS + has an option to disable one of the graphics adapters or + to set <quote>discrete</quote> mode.</para> + </listitem> + </itemizedlist> + </sect2> <sect2> - <title>Configuring X11</title> + <title>Configuring <application>&xorg;</application></title> <para><application>&xorg;</application> uses <acronym>HAL</acronym> to autodetect keyboards and mice. The <filename role="package">sysutils/hal</filename> and <filename role="package">devel/dbus</filename> ports are - installed as dependencies of + automatically installed as dependencies of <filename role="package">x11/xorg</filename>, but must be - enabled by the following entries in the - <filename>/etc/rc.conf</filename> file:</para> + enabled by adding the following entries to + <filename>/etc/rc.conf</filename>:</para> <programlisting>hald_enable="YES" dbus_enable="YES"</programlisting> - <para>These services should be started (either manually or by - rebooting) before further <application>&xorg;</application> - configuration or use is attempted.</para> - - <para><application>&xorg;</application> can often work without - any further configuration steps by simply typing at - prompt:</para> - - <screen>&prompt.user; <userinput>startx</userinput></screen> - - <para>The automatic configuration may fail to work with some - hardware, or may not set things up quite as desired. In - these cases, manual configuration will be necessary.</para> + <para>Start these services + before configuring <application>&xorg;</application>:</para> - <note> - <para>Desktop environments like - <application>GNOME</application>, - <application>KDE</application> or - <application>Xfce</application> have tools allowing the user - to easily set the screen parameters such as the resolution. - So if the default configuration is not acceptable and you - planned to install a desktop environment then just continue - with the installation of the desktop environment and use the - appropriate screen settings tool.</para> - </note> + <screen>&prompt.root; <userinput>service hald start</userinput> +&prompt.root; <userinput>service dbus start</userinput></screen> - <para>Configuration of X11 is a multi-step process. The first - step is to build an initial configuration file. As the super - user, simply run:</para> + <para>Once these services are started, check if + <application>&xorg;</application> auto-configures itself by + typing:</para> <screen>&prompt.root; <userinput>Xorg -configure</userinput></screen> - <para>This will generate an X11 configuration skeleton file in - the <filename>/root</filename> directory called - <filename>xorg.conf.new</filename> (whether you &man.su.1; or - do a direct login affects the inherited supervisor - <envar>$HOME</envar> directory variable). The X11 program - will attempt to probe the graphics hardware on the system and - write a configuration file to load the proper drivers for the - detected hardware on the target system.</para> - - <para>The next step is to test the existing - configuration to verify that <application>&xorg;</application> - can work with the graphics - hardware on the target system. Type:</para> + <para>This will generate a file named + <filename>/root/xorg.conf.new</filename> which attempts + to load the proper drivers for the + detected hardware. Next, test that the automatically generated + configuration file works with the graphics hardware by + typing:</para> <screen>&prompt.root; <userinput>Xorg -config xorg.conf.new -retro</userinput></screen> @@ -462,423 +470,162 @@ dbus_enable="YES"</programlisting> <programlisting>Option "DontZap" "off"</programlisting> </note> - <para>If the mouse does not work, you will need to first - configure it before proceeding. See <xref linkend="mouse"/> - in the &os; install chapter. In recent - <application>Xorg</application> versions, - the <literal>InputDevice</literal> sections in - <filename>xorg.conf</filename> are ignored in favor of the - autodetected devices. To restore the old behavior, add the - following line to the <literal>ServerLayout</literal> or - <literal>ServerFlags</literal> section of this file:</para> - - <programlisting>Option "AutoAddDevices" "false"</programlisting> - - <para>Input devices may then be configured as in previous - versions, along with any other options needed (e.g., keyboard - layout switching).</para> + <para>If the test is unsuccessful, skip ahead to <xref + linkend="x11-understanding"/>. Once the test is successful, + copy the configuration file to + <filename>/etc/X11/xorg.conf</filename>:</para> + <screen>&prompt.root; <userinput>cp xorg.conf.new /etc/X11/xorg.conf</userinput></screen> + <note> - <para>As previously explained the - <application>hald</application> daemon will, by default, - automatically detect your keyboard. There are chances that - your keyboard layout or model will not be correct, desktop - environments like <application>GNOME</application>, + <para>Desktop environments like + <application>GNOME</application>, <application>KDE</application> or - <application>Xfce</application> provide tools to configure - the keyboard. However, it is possible to set the keyboard - properties directly either with the help of the - &man.setxkbmap.1; utility or with a - <application>hald</application>'s configuration rule.</para> - - <para>For example if one wants to use a PC 102 keys keyboard - coming with a french layout, we have to create a keyboard - configuration file for <application>hald</application> - called <filename>x11-input.fdi</filename> and saved in the - <filename - class="directory">/usr/local/etc/hal/fdi/policy</filename> - directory. This file should contain the following - lines:</para> - - <programlisting><?xml version="1.0" encoding="iso-8859-1"?> -<deviceinfo version="0.2"> - <device> - <match key="info.capabilities" contains="input.keyboard"> - <merge key="input.x11_options.XkbModel" type="string">pc102</merge> - <merge key="input.x11_options.XkbLayout" type="string">fr</merge> - </match> - </device> -</deviceinfo></programlisting> + <application>Xfce</application> provide graphical tools + to set parameters such as video resolution. + If the default configuration works, skip to <xref linkend="x11-wm"/> + for examples on how to + install a desktop environment.</para> + </note> + </sect2> + </sect1> - <para>If this file already exists, just copy and add to your - file the lines regarding the keyboard configuration.</para> + <sect1 id="x-fonts"> + <sect1info> + <!--<authorgroup> + <author> + <firstname>Murray</firstname> + <surname>Stokely</surname> + <contrib>Contributed by </contrib> + </author> + </authorgroup>--> + </sect1info> + <title>Using Fonts in <application>&xorg;</application></title> - <para>You will have to reboot your machine to force - <application>hald</application> to read this file.</para> + <sect2 id="type1"> + <title>Type1 Fonts</title> - <para>It is possible to do the same configuration from an X - terminal or a script with this command line:</para> + <para>The default fonts that ship with <application>&xorg;</application> are less than ideal + for typical desktop publishing applications. Large + presentation fonts show up jagged and unprofessional looking, + and small fonts are almost completely unintelligible. + However, there are several free, high quality Type1 + (&postscript;) fonts available which can be readily used with + <application>&xorg;</application>. For instance, the URW font collection + (<filename role="package">x11-fonts/urwfonts</filename>) + includes high quality versions of standard type1 fonts + (<trademark class="registered">Times Roman</trademark>, + <trademark class="registered">Helvetica</trademark>, + <trademark class="registered">Palatino</trademark> and + others). The Freefonts collection + (<filename role="package">x11-fonts/freefonts</filename>) + includes many more fonts, but most of them are intended for + use in graphics software such as the + <application>Gimp</application>, and are not complete enough + to serve as screen fonts. In addition, <application>&xorg;</application> can be configured + to use &truetype; fonts with a minimum of effort. For more + details on this, see the &man.X.7; manual page or the + <link linkend="truetype">section on &truetype; + fonts</link>.</para> - <screen>&prompt.user; <userinput>setxkbmap -model pc102 -layout fr</userinput></screen> + <para>To install the above Type1 font collections from the + Ports Collection, run the following commands:</para> - <para>The - <filename>/usr/local/share/X11/xkb/rules/base.lst</filename> - file lists the various keyboard, layouts and options - available.</para> - </note> + <screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput> +&prompt.root; <userinput>make install clean</userinput></screen> - <indexterm><primary>X11 tuning</primary></indexterm> + <para>And likewise with the freefont or other collections. To + have the X server detect these fonts, add an appropriate line + to the X server configuration file + (<filename>/etc/X11/xorg.conf</filename>), which reads:</para> - <para>The <filename>xorg.conf.new</filename> configuration file - may now be tuned to taste. Open the file in a text editor - such as &man.emacs.1; or &man.ee.1;. If the monitor is an - older or unusual model that does not support autodetection of - sync frequencies, those settings can be added to - <filename>xorg.conf.new</filename> under the - <literal>"Monitor"</literal> section:</para> + <programlisting>FontPath "/usr/local/lib/X11/fonts/URW/"</programlisting> - <programlisting>Section "Monitor" - Identifier "Monitor0" - VendorName "Monitor Vendor" - ModelName "Monitor Model" - HorizSync 30-107 - VertRefresh 48-120 -EndSection</programlisting> + <para>Alternatively, at the command line in the X session + run:</para> - <para>Most monitors support sync frequency autodetection, - making manual entry of these values unnecessary. For the few - monitors that do not support autodetection, avoid potential - damage by only entering values provided by the - manufacturer.</para> + <screen>&prompt.user; <userinput>xset fp+ /usr/local/lib/X11/fonts/URW</userinput> +&prompt.user; <userinput>xset fp rehash</userinput></screen> - <para>X allows DPMS (Energy Star) features to be used with - capable monitors. The &man.xset.1; program controls the - time-outs and can force standby, suspend, or off modes. If - you wish to enable DPMS features for your monitor, you must - add the following line to the monitor section:</para> + <para>This will work but will be lost when the X session is + closed, unless it is added to the startup file + (<filename>~/.xinitrc</filename> for a normal + <command>startx</command> session, or + <filename>~/.xsession</filename> when logging in through a + graphical login manager like <application>XDM</application>). + A third way is to use the new + <filename>/usr/local/etc/fonts/local.conf</filename> file: see + the section on + <link linkend="antialias">anti-aliasing</link>.</para> + </sect2> - <programlisting>Option "DPMS"</programlisting> + <sect2 id="truetype"> + <title>&truetype; Fonts</title> <indexterm> - <primary><filename>xorg.conf</filename></primary> + <primary>TrueType Fonts</primary> + </indexterm> + <indexterm> + <primary>fonts</primary> + <secondary>TrueType</secondary> </indexterm> - <para>While the <filename>xorg.conf.new</filename> - configuration file is still open in an editor, select the - default resolution and color depth desired. This is defined - in the <literal>"Screen"</literal> section:</para> + <para><application>&xorg;</application> has built in support for + rendering &truetype; fonts. There are two different modules + that can enable this functionality. The freetype module is + used in this example because it is more consistent with the + other font rendering back-ends. To enable the freetype module + just add the following line to the <literal>"Module"</literal> + section of the <filename>/etc/X11/xorg.conf</filename> + file.</para> - <programlisting>Section "Screen" - Identifier "Screen0" - Device "Card0" - Monitor "Monitor0" - DefaultDepth 24 - SubSection "Display" - Viewport 0 0 - Depth 24 - Modes "1024x768" - EndSubSection -EndSection</programlisting> + <programlisting>Load "freetype"</programlisting> - <para>The <literal>DefaultDepth</literal> keyword describes the - color depth to run at by default. This can be overridden with - the <option>-depth</option> command line switch to - &man.Xorg.1;. The <literal>Modes</literal> keyword describes - the resolution to run at for the given color depth. Note that - only VESA standard modes are supported as defined by the - target system's graphics hardware. In the example above, the - default color depth is twenty-four bits per pixel. At this - color depth, the accepted resolution is 1024 by 768 - pixels.</para> + <para>Now make a directory for the &truetype; fonts (for + example, + <filename>/usr/local/lib/X11/fonts/TrueType</filename>) and + copy all of the &truetype; fonts into this directory. Keep in + mind that &truetype; fonts cannot be directly taken from a + &macintosh;; they must be in &unix;/&ms-dos;/&windows; format + for use by <application>&xorg;</application>. Once the files have been copied into this + directory, use <application>ttmkfdir</application> to create a + <filename>fonts.dir</filename> file, so that the X font + renderer knows that these new files have been installed. + <command>ttmkfdir</command> is available from the FreeBSD + Ports Collection as + <filename role="package">x11-fonts/ttmkfdir</filename>.</para> - <para>Finally, write the configuration file and test it using - the test mode given above.</para> + <screen>&prompt.root; <userinput>cd /usr/local/lib/X11/fonts/TrueType</userinput> +&prompt.root; <userinput>ttmkfdir -o fonts.dir</userinput></screen> - <note> - <para>One of the tools available to assist you during - troubleshooting process are the X11 log files, which contain - information on each device that the X11 server attaches to. - <application>&xorg;</application> log file names are in the - format of <filename>/var/log/Xorg.0.log</filename>. The - exact name of the log can vary from - <filename>Xorg.0.log</filename> to - <filename>Xorg.8.log</filename> and so forth.</para> - </note> + <para>Now add the &truetype; directory to the font path. This + is just the same as described above for + <link linkend="type1">Type1</link> fonts, that is, use</para> - <para>If all is well, the configuration file needs to be - installed in a common location where &man.Xorg.1; can find it. - This is typically <filename>/etc/X11/xorg.conf</filename> or - <filename>/usr/local/etc/X11/xorg.conf</filename>.</para> + <screen>&prompt.user; <userinput>xset fp+ /usr/local/lib/X11/fonts/TrueType</userinput> +&prompt.user; <userinput>xset fp rehash</userinput></screen> - <screen>&prompt.root; <userinput>cp xorg.conf.new /etc/X11/xorg.conf</userinput></screen> + <para>or add a <literal>FontPath</literal> line to the + <filename>xorg.conf</filename> file.</para> - <para>The X11 configuration process is now complete. - <application>&xorg;</application> may be now started with the - &man.startx.1; utility. The X11 server may also be started - with the use of &man.xdm.1;.</para> - </sect2> - - <sect2> - <title>Advanced Configuration Topics</title> - - <sect3> - <title>Configuration with &intel; <literal>i810</literal> - Graphics Chipsets</title> - - <indexterm> - <primary>Intel i810 graphic chipset</primary> - </indexterm> - - <para>Configuration with &intel; i810 integrated chipsets - requires the <devicename>agpgart</devicename> AGP - programming interface for X11 to drive the card. See the - &man.agp.4; driver manual page for more information.</para> - - <para>This will allow configuration of the hardware as any - other graphics board. Note on systems without the - &man.agp.4; driver compiled in the kernel, trying to load - the module with &man.kldload.8; will not work. This driver - has to be in the kernel at boot time through being compiled - in or using <filename>/boot/loader.conf</filename>.</para> - </sect3> - - <sect3> - <title>Adding a Widescreen Flatpanel to the Mix</title> - - <indexterm> - <primary>widescreen flatpanel configuration</primary> - </indexterm> - - <para>This section assumes a bit of advanced configuration - knowledge. If attempts to use the standard configuration - tools above have not resulted in a working configuration, - there is information enough in the log files to be of use in - getting the setup working. Use of a text editor will be - necessary.</para> - - <para>Current widescreen (WSXGA, WSXGA+, WUXGA, WXGA, WXGA+, - et.al.) formats support 16:10 and 10:9 formats or aspect - ratios that can be problematic. Examples of some common - screen resolutions for 16:10 aspect ratios are:</para> - - <itemizedlist> - <listitem> - <para>2560x1600</para> - </listitem> - - <listitem> - <para>1920x1200</para> - </listitem> - - <listitem> - <para>1680x1050</para> - </listitem> - - <listitem> - <para>1440x900</para> - </listitem> - - <listitem> - <para>1280x800</para> - </listitem> - </itemizedlist> - - <para>At some point, it will be as easy as adding one of these - resolutions as a possible <literal>Mode</literal> in the - <literal>Section "Screen"</literal> as such:</para> - - <programlisting>Section "Screen" -Identifier "Screen0" -Device "Card0" -Monitor "Monitor0" -DefaultDepth 24 -SubSection "Display" - Viewport 0 0 - Depth 24 - Modes "1680x1050" -EndSubSection -EndSection</programlisting> - - <para><application>&xorg;</application> is smart enough to - pull the resolution information from the widescreen via - I2C/DDC information so it knows what the monitor can handle - as far as frequencies and resolutions.</para> - - <para>If those <literal>ModeLines</literal> do not exist in - the drivers, one might need to give - <application>&xorg;</application> a little hint. Using - <filename>/var/log/Xorg.0.log</filename> one can extract - enough information to manually create a - <literal>ModeLine</literal> that will work. Simply look for - information resembling this:</para> - - <programlisting>(II) MGA(0): Supported additional Video Mode: -(II) MGA(0): clock: 146.2 MHz Image Size: 433 x 271 mm -(II) MGA(0): h_active: 1680 h_sync: 1784 h_sync_end 1960 h_blank_end 2240 h_border: 0 -(II) MGA(0): v_active: 1050 v_sync: 1053 v_sync_end 1059 v_blanking: 1089 v_border: 0 -(II) MGA(0): Ranges: V min: 48 V max: 85 Hz, H min: 30 H max: 94 kHz, PixClock max 170 MHz</programlisting> - - <para>This information is called EDID information. Creating a - <literal>ModeLine</literal> from this is just a matter of - putting the numbers in the correct order:</para> - - <programlisting>ModeLine <name> <clock> <4 horiz. timings> <4 vert. timings></programlisting> - - <para>So that the <literal>ModeLine</literal> in - <literal>Section "Monitor"</literal> for this example would - look like this:</para> - - <programlisting>Section "Monitor" -Identifier "Monitor1" -VendorName "Bigname" -ModelName "BestModel" -ModeLine "1680x1050" 146.2 1680 1784 1960 2240 1050 1053 1059 1089 -Option "DPMS" -EndSection</programlisting> - - <para>Now having completed these simple editing steps, X - should start on your new widescreen monitor.</para> - </sect3> - </sect2> - </sect1> - - <sect1 id="x-fonts"> - <sect1info> - <authorgroup> - <author> - <firstname>Murray</firstname> - <surname>Stokely</surname> - <contrib>Contributed by </contrib> - </author> - </authorgroup> - </sect1info> - <title>Using Fonts in X11</title> - - <sect2 id="type1"> - <title>Type1 Fonts</title> - - <para>The default fonts that ship with X11 are less than ideal - for typical desktop publishing applications. Large - presentation fonts show up jagged and unprofessional looking, - and small fonts are almost completely unintelligible. - However, there are several free, high quality Type1 - (&postscript;) fonts available which can be readily used with - X11. For instance, the URW font collection - (<filename role="package">x11-fonts/urwfonts</filename>) - includes high quality versions of standard type1 fonts - (<trademark class="registered">Times Roman</trademark>, - <trademark class="registered">Helvetica</trademark>, - <trademark class="registered">Palatino</trademark> and - others). The Freefonts collection - (<filename role="package">x11-fonts/freefonts</filename>) - includes many more fonts, but most of them are intended for - use in graphics software such as the - <application>Gimp</application>, and are not complete enough - to serve as screen fonts. In addition, X11 can be configured - to use &truetype; fonts with a minimum of effort. For more - details on this, see the &man.X.7; manual page or the - <link linkend="truetype">section on &truetype; - fonts</link>.</para> - - <para>To install the above Type1 font collections from the - Ports Collection, run the following commands:</para> - - <screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput> -&prompt.root; <userinput>make install clean</userinput></screen> - - <para>And likewise with the freefont or other collections. To - have the X server detect these fonts, add an appropriate line - to the X server configuration file - (<filename>/etc/X11/xorg.conf</filename>), which reads:</para> - - <programlisting>FontPath "/usr/local/lib/X11/fonts/URW/"</programlisting> - - <para>Alternatively, at the command line in the X session - run:</para> - - <screen>&prompt.user; <userinput>xset fp+ /usr/local/lib/X11/fonts/URW</userinput> -&prompt.user; <userinput>xset fp rehash</userinput></screen> - - <para>This will work but will be lost when the X session is - closed, unless it is added to the startup file - (<filename>~/.xinitrc</filename> for a normal - <command>startx</command> session, or - <filename>~/.xsession</filename> when logging in through a - graphical login manager like <application>XDM</application>). - A third way is to use the new - <filename>/usr/local/etc/fonts/local.conf</filename> file: see - the section on - <link linkend="antialias">anti-aliasing</link>.</para> - </sect2> - - <sect2 id="truetype"> - <title>&truetype; Fonts</title> - - <indexterm> - <primary>TrueType Fonts</primary> - </indexterm> - <indexterm> - <primary>fonts</primary> - <secondary>TrueType</secondary> - </indexterm> - - <para><application>&xorg;</application> has built in support for - rendering &truetype; fonts. There are two different modules - that can enable this functionality. The freetype module is - used in this example because it is more consistent with the - other font rendering back-ends. To enable the freetype module - just add the following line to the <literal>"Module"</literal> - section of the <filename>/etc/X11/xorg.conf</filename> - file.</para> - - <programlisting>Load "freetype"</programlisting> - - <para>Now make a directory for the &truetype; fonts (for - example, - <filename>/usr/local/lib/X11/fonts/TrueType</filename>) and - copy all of the &truetype; fonts into this directory. Keep in - mind that &truetype; fonts cannot be directly taken from a - &macintosh;; they must be in &unix;/&ms-dos;/&windows; format - for use by X11. Once the files have been copied into this - directory, use <application>ttmkfdir</application> to create a - <filename>fonts.dir</filename> file, so that the X font - renderer knows that these new files have been installed. - <command>ttmkfdir</command> is available from the FreeBSD - Ports Collection as - <filename role="package">x11-fonts/ttmkfdir</filename>.</para> - - <screen>&prompt.root; <userinput>cd /usr/local/lib/X11/fonts/TrueType</userinput> -&prompt.root; <userinput>ttmkfdir -o fonts.dir</userinput></screen> - - <para>Now add the &truetype; directory to the font path. This - is just the same as described above for - <link linkend="type1">Type1</link> fonts, that is, use</para> - - <screen>&prompt.user; <userinput>xset fp+ /usr/local/lib/X11/fonts/TrueType</userinput> -&prompt.user; <userinput>xset fp rehash</userinput></screen> - - <para>or add a <literal>FontPath</literal> line to the - <filename>xorg.conf</filename> file.</para> - - <para>That's it. Now <application>Gimp</application>, - <application>Apache OpenOffice</application>, and all of the - other X applications should now recognize the installed - &truetype; fonts. Extremely small fonts (as with text in a - high resolution display on a web page) and extremely large - fonts (within <application>&staroffice;</application>) will - look much better now.</para> + <para>That's it. Now <application>Gimp</application>, + <application>Apache OpenOffice</application>, and all of the + other X applications should now recognize the installed + &truetype; fonts. Extremely small fonts (as with text in a + high resolution display on a web page) and extremely large + fonts (within <application>&staroffice;</application>) will + look much better now.</para> </sect2> <sect2 id="antialias"> <sect2info> - <authorgroup> + <!--<authorgroup> <author> <firstname>Joe Marcus</firstname> <surname>Clarke</surname> - <contrib>Updated by </contrib> - <!-- May 2003 --> + <contrib>Updated in May 2003 by</contrib> </author> - </authorgroup> + </authorgroup>--> </sect2info> <title>Anti-Aliased Fonts</title> @@ -890,7 +637,7 @@ EndSection</programlisting> <secondary>anti-aliased</secondary> </indexterm> - <para>All fonts in X11 that are found in + <para>All fonts in <application>&xorg;</application> that are found in <filename>/usr/local/lib/X11/fonts/</filename> and <filename>~/.fonts/</filename> are automatically made available for anti-aliasing to Xft-aware applications. Most @@ -1060,13 +807,13 @@ EndSection</programlisting> <sect1 id="x-xdm"> <sect1info> - <authorgroup> + <!--<authorgroup> <author> <firstname>Seth</firstname> <surname>Kingsley</surname> <contrib>Contributed by </contrib> </author> - </authorgroup> + </authorgroup>--> </sect1info> <title>The X Display Manager</title> @@ -1230,7 +977,7 @@ EndSection</programlisting> chooser and login screens. In it, the appearance of the login program can be modified. The format is identical to the app-defaults file described in the - X11 documentation.</para> + <application>&xorg;</application> documentation.</para> </sect3> <sect3> @@ -1321,14 +1068,13 @@ DisplayManager.requestPort: 0</scree <sect1 id="x11-wm"> <sect1info> - <authorgroup> + <!--<authorgroup> <author> <firstname>Valentino</firstname> <surname>Vaschetto</surname> - <contrib>Contributed by </contrib> + <contrib>Contributed in June 2001 by </contrib> </author> - <!-- June 2001 --> - </authorgroup> + </authorgroup>--> </sect1info> <title>Desktop Environments</title> @@ -1718,4 +1464,283 @@ DisplayManager.requestPort: 0</scree </sect3> </sect2> </sect1> + + <sect1 id="x11-understanding"> + + <title>Troubleshooting</title> + + <para>If the mouse does not work, you will need to first + configure it before proceeding. See <xref linkend="mouse"/> + in the &os; install chapter. In recent + <application>Xorg</application> versions, + the <literal>InputDevice</literal> sections in + <filename>xorg.conf</filename> are ignored in favor of the + autodetected devices. To restore the old behavior, add the + following line to the <literal>ServerLayout</literal> or + <literal>ServerFlags</literal> section of this file:</para> + + <programlisting>Option "AutoAddDevices" "false"</programlisting> + + <para>Input devices may then be configured as in previous + versions, along with any other options needed (e.g., keyboard + layout switching).</para> + + <note> + <para>As previously explained the + <application>hald</application> daemon will, by default, + automatically detect your keyboard. There are chances that + your keyboard layout or model will not be correct, desktop + environments like <application>GNOME</application>, + <application>KDE</application> or + <application>Xfce</application> provide tools to configure + the keyboard. However, it is possible to set the keyboard + properties directly either with the help of the + &man.setxkbmap.1; utility or with a + <application>hald</application>'s configuration rule.</para> + + <para>For example if, one wants to use a PC 102 keys keyboard + coming with a french layout, we have to create a keyboard + configuration file for <application>hald</application> + called <filename>x11-input.fdi</filename> and saved in the + <filename + class="directory">/usr/local/etc/hal/fdi/policy</filename> + directory. This file should contain the following + lines:</para> + + <programlisting><?xml version="1.0" encoding="iso-8859-1"?> +<deviceinfo version="0.2"> + <device> + <match key="info.capabilities" contains="input.keyboard"> + <merge key="input.x11_options.XkbModel" type="string">pc102</merge> + <merge key="input.x11_options.XkbLayout" type="string">fr</merge> + </match> + </device> +</deviceinfo></programlisting> + + <para>If this file already exists, just copy and add to your + file the lines regarding the keyboard configuration.</para> + + <para>You will have to reboot your machine to force + <application>hald</application> to read this file.</para> + + <para>It is possible to do the same configuration from an X + terminal or a script with this command line:</para> + + <screen>&prompt.user; <userinput>setxkbmap -model pc102 -layout fr</userinput></screen> + + <para>The + <filename>/usr/local/share/X11/xkb/rules/base.lst</filename> + file lists the various keyboard, layouts and options + available.</para> + </note> + + <indexterm><primary><application>&xorg;</application> tuning</primary></indexterm> + + <para>The <filename>xorg.conf.new</filename> configuration file + may now be tuned to taste. Open the file in a text editor + such as &man.emacs.1; or &man.ee.1;. If the monitor is an + older or unusual model that does not support autodetection of + sync frequencies, those settings can be added to + <filename>xorg.conf.new</filename> under the *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310082138.r98LcPdW082358>