From: luxh
Date: Tue, 12 Jun 2012 20:14:45 +0000 (-0700)
Subject: Massive cleanup
X-Git-Url: http://gitweb.dragonflybsd.org/ikiwiki.git/commitdiff_plain/8ff68d2e56f35669dced1c81952283cc4ca8067b
Massive cleanup
---
diff --git a/docs/newhandbook/X/index.mdwn b/docs/newhandbook/X/index.mdwn
index 9d791eb..b43ba45 100644
--- a/docs/newhandbook/X/index.mdwn
+++ b/docs/newhandbook/X/index.mdwn
@@ -6,7 +6,7 @@
## Synopsis
-DragonFly uses X11 to provide users with a powerful graphical user interface. X11 is an open-source implementation of the X Window System that includes both **X.org** and **XFree86â¢** . DragonFly default official flavor is **X.org**. This chapter will cover the installation and configuration of X11. For more information on the video hardware that X11 supports, check either [X.org](http://www.x.org/) web site.
+This chapter will cover the installation and some configuration of X11. For more information on the video hardware that X11 supports, check the [X.org](http://www.x.org/) web site. If you have problems configuring, just search the web. There are lots of tutorials and guides on how to set up your X properly.
@@ -14,18 +14,7 @@ After reading this chapter, you will know:
-
-* The various components of the X Window System, and how they interoperate.
-* How to install and configure X11.
-* How to install and use different window managers.
-* How to use True***TypeÂ® fonts in X11.
-* How to set up your system for graphical logins ( **XDM** ).
-
-
-
-Before reading this chapter, you should:
-
-* Know how to install additional third-party software. Compare the pkgsrc chapter of the handbook.
+Before reading this chapter, you should know how to install additional third-party software. Read the pkgsrc section of the documentation.
@@ -37,15 +26,13 @@ Before reading this chapter, you should:
-The X design philosophy is much like the UNIX design philosophy, ***tools, not policy***. This means that X does not try to dictate how a task is to be accomplished. Instead, tools are provided to the user, and it is the user's responsibility to decide how to use those tools. This philosophy extends to X not dictating what windows should look like on screen, how to move them around with the mouse, what keystrokes should be used to move between windows (i.e., **Alt** + **Tab** , in the case of MicrosoftÂ Windows), what the title bars on each window should look like, whether or not they have close buttons on them, and so on.
-
+X.org itself does not give you a window manager. You will have to choose one and install it yourself. There are dozens of window managers available for X. Each of these provides a different look and feel. Window managers are available in the `wm` category of the pkgsrc collection.
-Instead, X delegates this responsibility to an application called a ***Window Manager***. There are dozens of window managers available for X: ***'After***Step***', **Blackbox** , **ctwm** , **Enlightenment** , **fvwm** , **Sawfish** , **twm** , **Window Maker** , and more. Each of these window managers provides a different look and feel; some of them support ***virtual desktops***; some of them allow customized keystrokes to manage the desktop; some have a ***Start*** button or similar device; some are ***themeable***, allowing a complete change of look-and-feel by applying a new theme. These window managers, and many more, are available in the `wm` category of the pkgsrc collection.
+In addition, the **KDE** and **GNOME** desktop environments both have their own window managers which integrate with the desktop.
-
-In addition, the **KDE** and **GNOME** desktop environments both have their own window managers which integrate with the desktop. Each window manager also has a different configuration mechanism; some expect configuration file written by hand, others feature GUI tools for most of the configuration tasks; at least one ( **Sawfish** ) has a configuration file written in a dialect of the Lisp language.
+Every window manager also has a different configuration mechanism. Read your manager's documentation to learn more.
@@ -124,485 +111,15 @@ If a black and grey grid and an X mouse cursor appear, the configuration was suc
# rcenable moused
-**Note** http://technoninja.blogspot.com/2010/07/dragonflybsd-mouse-wtf-problem-fix.html
-
-Next, you may need the following information about the target system:
-
-
-
-* Monitor specifications
-
-
-* Video Adapter chipset
-
-
-* Video Adapter memory
-
-
-
-The specifications for the monitor are used by X11 to determine the resolution and refresh rate to run at. These specifications can usually be obtained from the documentation that came with the monitor or from the manufacturer's website. There are two ranges of numbers that are needed, the horizontal scan rate and the vertical synchronization rate.
-
-
-
-The video adapter's chipset defines what driver module X11 uses to talk to the graphics hardware. With most chipsets, this can be automatically determined, but it is still useful to know in case the automatic detection does not work correctly.
-
-Video memory on the graphic adapter determines the resolution and color depth which the system can run at. This is important to know so the user knows the limitations of the system.
-
-Tune the `xorg.conf.new` configuration file to taste. Open the file in a text editor such as [vi(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=vi&section=1) or [ee(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=ee&section=1). First, add the frequencies for the target system's monitor. These are usually expressed as a horizontal and vertical synchronization rate. These values are added to the `xorg.conf.new` file under the `"Monitor"` section:
+Tune the `xorg.conf.new` configuration file to taste and move it to where [Xorg(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xorg&section=1) can find it. This is typically `/etc/X11/xorg.conf` or `/usr/pkg/xorg/lib/X11/xorg.conf`.
- Section "Monitor"
- Identifier "Monitor0"
- VendorName "Monitor Vendor"
- ModelName "Monitor Model"
- HorizSync 30-107
- VertRefresh 48-120
- EndSection
-
-
-
-The `HorizSync` and `VertRefresh` keywords may be missing in the configuration file. If they are, they need to be added, with the correct horizontal synchronization rate placed after the `HorizSync` keyword and the vertical synchronization rate after the `VertRefresh` keyword. In the example above the target monitor's rates were entered.
-
-
-
-X allows DPMS (Energy Star) features to be used with capable monitors. The [xset(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xset&section=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:
-
- Option "DPMS"
-
-
-
-While the `xorg.conf.new` configuration file is still open in an editor, select the default resolution and color depth desired. This is defined in the `"Screen"` section:
-
-
-
-
-
- Section "Screen"
- Identifier "Screen0"
- Device "Card0"
- Monitor "Monitor0"
- DefaultDepth 24
- SubSection "Display"
- Viewport 0 0
- Depth 24
- Modes "1024x768"
- EndSubSection
- EndSection
-
-
-The `DefaultDepth` keyword describes the color depth to run at by default. This can be overridden with the `-depth` command line switch to [Xorg(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xorg&section=1). The `Modes` 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.
-
-
-Finally, write the configuration file and test it using the test mode given above.
-
-
-**Note:** 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. **X.org** log file names are in the format of `/var/log/Xorg.0.log`. The exact name of the log can vary from `Xorg.0.log` to `Xorg.8.log` and so forth.
-
-
-
-If all is well, the configuration file needs to be installed in a common location where [Xorg(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xorg&section=1) can find it. This is typically `/etc/X11/xorg.conf` or `/usr/pkg/xorg/lib/X11/xorg.conf`.
-
-
-
- # cp xorg.conf.new /etc/X11/xorg.conf
-
-
-
The X11 configuration process is now complete. You can start **X.org** with [startx(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=startx&section=1). The X11 server may also be started with the use of [xdm(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xdm&section=1).
-**Note:** There is also a graphical configuration tool, [xorgcfg(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xorgcfg&section=1), that comes with the X11 distribution. It allows you to interactively define your configuration by choosing the appropriate drivers and settings. This program can be invoked from the console, by typing the command `xorgcfg -textmode`. For more details, refer to the [xorgcfg(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xorgcfg&section=1) manual page.
-
-
-Alternatively, there is also a tool called [xorgconfig(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xorgconfig&section=1), this program is a console utility that is less user friendly, but it may work in situations where the other tools do not.
-
-
-
-### Advanced Configuration Topics
-
-
-
-#### Configuration with IntelÂ® i810 Graphics Chipsets
-
-
-
-Configuration with IntelÂ® i810 integrated chipsets requires the `agpgart` AGP programming interface for X11 to drive the card. See the [agp(4)](http://leaf.dragonflybsd.org/cgi/web-man?command=agp&section=4) driver manual page for more information.
-
-
-This will allow configuration of the hardware as any other graphics board. Note on systems without the [agp(4)](http://leaf.dragonflybsd.org/cgi/web-man?command#agp&section4) driver compiled in the kernel, trying to load the module with [kldload(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=kldload&section=8) will not work. This driver has to be in the kernel at boot time through being compiled in or using `/boot/loader.conf`.
-
-
-**Note:** If you are using **XFree86Â 4.1.0** (or later) and messages about unresolved symbols like `fbPictureInit` appear, try adding the following line after `Driver "i810"` in the X11 configuration file:
-
- Option "NoDDC"
-
-
-
-
-
-----
-
-
-
-
-
-
-## Using Fonts in X11
-
-
-
- ***Contributed by Murray Stokely. ***
-
-
-
-### Type1 Fonts
-
-
-
- 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 in **NetscapeÂ®** are almost completely unintelligible. However, there are several free, high quality Type1 (Post***ScriptÂ®) fonts available which can be readily used with X11. For instance, the Freefonts collection (['fonts/freefonts'](http://pkgsrc.se/fonts/freefonts)) includes a lot of fonts, but most of them are intended for use in graphics software such as the **Gimp** , and are not complete enough to serve as screen fonts. In addition, X11 can be configured to use True***TypeÂ® fonts with a minimum of effort. For more details on this, see the [X(7)](http://leaf.dragonflybsd.org/cgi/web-man?command=X&section=7) manual page or the [ section on TrueType fonts](x-fonts.html#TRUETYPE).
-
-
-
- To install the Freefonts font collection from the pkgsrc framework, run the following commands:
-
-
-
-
-
- # cd /usr/pkgsrc/fonts/freefonts
-
- # bmake install clean
-
-
-
-
-
- And likewise with the other collections. To have the X server detect these fonts, add an appropriate line to the X server configuration file in `/etc/X11/xorg.conf`, which reads:
-
-
-
-
-
- FontPath "/usr/pkg/lib/X11/fonts/freefont/"
-
-
-
-
-
- Alternatively, at the command line in the X session run:
-
-
-
-
-
- % xset fp+ /usr/pkg/lib/X11/fonts/freefont/
-
- % xset fp rehash
-
-
-
-
-
- This will work but will be lost when the X session is closed, unless it is added to the startup file (`~/.xinitrc` for a normal `startx` session, or `~/.xsession` when logging in through a graphical login manager like **XDM** ). A third way is to use the new `/usr/pkg/xorg/etc/fonts/local.conf` file: see the section on [ anti-aliasing](x-fonts.html#ANTIALIAS).
-
-
-
-### TrueTypeÂ® Fonts
-
-
-
- **X.org** has built in support for rendering True***Type 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 `"Module"` section of the `/etc/X11/xorg.conf` file.
-
-
-
-
-
- Load "freetype"
-
-
-
-
-
- Now make a directory for the True***Type fonts (for example, `/usr/pkg/xorg/lib/X11/fonts/TrueType`) and copy all of the True***Type fonts into this directory. Keep in mind that True***Type 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 **ttmkfdir** to create a `fonts.dir` file, so that the X font renderer knows that these new files have been installed. 'ttmkfdir' is available from the pkgsrc framework as [`fonts/ttmkfdir2`](http://pkgsrc.se/fonts/ttmkfdir2).
-
-
-
-
-
- # cd /usr/pkg/xorg/lib/X11/fonts/TrueType
-
- # ttmkfdir -o fonts.dir
-
-
-
-
-
- Now add the True***Type directory to the font path. This is just the same as described above for [ Type1](x-fonts.html#TYPE1) fonts, that is, use
-
-
-
-
-
- % xset fp+ /usr/pkg/xorg/lib/X11/fonts/TrueType
-
- % xset fp rehash
-
-
-
-
-
- or add a `FontPath` line to the `xorg.conf` file.
-
-
-
- That's it. Now **Netscape** , **Gimp** , ***'Star***Officeâ¢***', and all of the other X applications should now recognize the installed True***Type fonts. Extremely small fonts (as with text in a high resolution display on a web page) and extremely large fonts (within **Star`Office** ) will look much better now.
-
-
-
-### Anti-Aliased Fonts
-
-
-
- ***Updated by Joe Marcus Clarke. ***
-
-
-
- Anti-aliasing has been available in X11 since **XFree86** 4.0.2. However, font configuration was cumbersome before the introduction of **XFree86** 4.3.0. Beginning with **XFree86** 4.3.0, all fonts in X11 that are found in `/usr/pkg/xorg/lib/X11/fonts/` and `~/.fonts/` are automatically made available for anti-aliasing to Xft-aware applications. Not all applications are Xft-aware, but many have received Xft support. Examples of Xft-aware applications include Qt 2.3 and higher (the toolkit for the **KDE** desktop), GTK+ 2.0 and higher (the toolkit for the **GNOME** desktop), and **Mozilla** 1.2 and higher.
-
-
-
- In order to control which fonts are anti-aliased, or to configure anti-aliasing properties, create (or edit, if it already exists) the file `/usr/pkg/xorg/lib/etc/fonts/local.conf`. Several advanced features of the Xft font system can be tuned using this file; this section describes only some simple possibilities. For more details, please see [fonts-conf(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=fonts-conf&section=5).
-
-
-
- This file must be in XML format. Pay careful attention to case, and make sure all tags are properly closed. The file begins with the usual XML header followed by a DOCTYPE definition, and then the `` tag:
-
-
-
-
-
- ;
-
-
-
-
-
-
-
-
-
- As previously stated, all fonts in `/usr/pkg/xorg/lib/X11/fonts/` as well as `~/.fonts/` are already made available to Xft-aware applications. If you wish to add another directory outside of these two directory trees, add a line similar to the following to `/usr/pkg/lib/etc/fonts/local.conf`:
-
-
-
-
-
- /path/to/my/fonts;
-
-
-
-
-
- After adding new fonts, and especially new font directories, you should run the following command to rebuild the font caches:
-
-
-
-
-
- # fc-cache -f
-
-
-
-
-
- Anti-aliasing makes borders slightly fuzzy, which makes very small text more readable and removes "staircases" from large text, but can cause eyestrain if applied to normal text. To exclude font sizes smaller than 14 point from anti-aliasing, include these lines:
-
-
-
-
-
-
-
-
-
- 14
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
- 14
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
- Spacing for some monospaced fonts may also be inappropriate with anti-aliasing. This seems to be an issue with **KDE** , in particular. One possible fix for this is to force the spacing for such fonts to be 100. Add the following lines:
-
-
-
-
-
-
-
-
-
- fixed
-
-
-
-
-
- mono
-
-
-
-
-
-
-
-
-
- console
-
-
-
-
-
- mono
-
-
-
-
-
-
-
-
-
- (this aliases the other common names for fixed fonts as `"mono"`), and then add:
-
-
-
-
-
-
-
-
-
- mono
-
-
-
-
-
- 100
-
-
-
-
-
-
-
-
-
- Certain fonts, such as Helvetica, may have a problem when anti-aliased. Usually this manifests itself as a font that seems cut in half vertically. At worst, it may cause applications such as **Mozilla** to crash. To avoid this, consider adding the following to `local.conf`:
-
-
-
-
-
-
-
-
-
- Helvetica
-
-
-
-
-
- sans-serif
-
-
-
-
-
-
-
-
-
- Once you have finished editing `local.conf` make sure you end the file with the `` tag. Not doing this will cause your changes to be ignored.
-
-
-
- The default font set that comes with X11 is not very desirable when it comes to anti-aliasing. A much better set of default fonts can be found in the ['fonts/vera-ttf'](http://pkgsrc.se/fonts/vera-ttf) port. This port will install a `/usr/pkg/lib/etc/fonts/local.conf` file if one does not exist already. If the file does exist, the port will create a `/usr/pkg/lib/etc/fonts/local.conf-vera ` file. Merge the contents of this file into `/usr/pkg/lib/etc/fonts/local.conf`, and the Bitstream fonts will automatically replace the default X11 Serif, Sans Serif, and Monospaced fonts.
-
-
-
- Finally, users can add their own settings via their personal `.fonts.conf` files. To do this, each user should simply create a `~/.fonts.conf`. This file must also be in XML format.
-
-
-
- One last point: with an LCD screen, sub-pixel sampling may be desired. This basically treats the (horizontally separated) red, green and blue components separately to improve the horizontal resolution; the results can be dramatic. To enable this, add the line somewhere in the `local.conf` file:
-
-
-
-
-
-
-
-
-
- unknown
-
-
-
-
-
- rgb
-
-
-
-
-
-
-
-
-
- **Note:** Depending on the sort of display, `rgb` may need to be changed to `bgr`, `vrgb` or `vbgr`: experiment and see which works best.
-
-
-
-
-
- Anti-aliasing should be enabled the next time the X server is started. However, programs must know how to take advantage of it. At present, the Qt toolkit does, so the entire **KDE** environment can use anti-aliased fonts. GTK+ and **GNOME** can also be made to use anti-aliasing via the "Font" capplet (see [x11-wm.html#X11-WM-GNOME-ANTIALIAS Section 5.7.1.3] for details). By default, **Mozilla** 1.2 and greater will automatically use anti-aliasing. To disable this, rebuild **Mozilla** with the `-DWITHOUT_XFT` flag.
-
-
-----
-
## The X Display Manager