Learning DebianGNU Linux-Chapter 5: Installing and Configuring the X Window System

19 386 0
Learning DebianGNU Linux-Chapter 5: Installing and Configuring the X Window System

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

5. Installing and Configuring the X Window System This chapter helps you install, configure, and use the X Window System (often known simply as X). Once X is up and running, you can choose how to start X. This chapter explains your options and also gives some tips on optimizing the performance of X. 5.1 What is X? X is the standard graphical user interface for Linux. Like other graphical user interfaces such as Microsoft Windows and Mac OS, X lets you interact with programs by using a mouse (or other pointing device) to point and click, providing a simple means of communicating with your computer. Originally implemented as a collaborative effort of Digital Equipment Corporation and Massachusetts Institute of Technology, X was first released in 1987. Subsequently, the X Consortium, Inc. became responsible for the continued development and publication of X. Despite its age, X is a remarkable and very modern software system: a cross- platform, network-oriented graphical user interface. It runs on a wide variety of platforms, including essentially every variety of Unix. X Clients are available for use, for example, under Windows 3.x, 9x, and NT. The sophisticated networking capabilities of X let you run a program on one computer while viewing the graphical output on another computer, connected to the first via a network. With the advent of the Internet, which interconnected a sizable fraction of the computers on the planet, X achieved a new height of importance and power. Most Linux users run XFree86, a freely available software system compatible with X. XFree86 was developed by the XFree86 software team, which began work in 1992. In 1994, The XFree86 Project assumed responsibility for ongoing research and development of XFree86. 5.2 Installing X Getting a proper X Window System up and running used to be a real challenge on Linux, almost a rite of passage. Today, device drivers are available for a much wider array of hardware, and configuration tools to assist in the setup process have greatly improved. While still tricky at times - especially with unusual hardware - X setup and configuration is no longer the daunting process it once was, and should be relatively easy. You'll go through two stages before you have X successfully running. The first stage involves installing the needed programs that enable X to run. These can be grouped into several categories:  Basic XFree86 program  X servers  Window Managers  Applications  Fonts This stage is very straightforward and can even be done as part of the basic installation process, if you select the relevant X packages during that step. In the second stage you configure X to run properly on your system. This is a matter of identifying an X server compatible with your graphics card, and tuning the server for your graphics card. If you have a common card and all the documentation for it, this second stage will be relatively simple. Missing information makes the process harder, but not impossible. As shown in Appendix C, The Debian Package Management Utilities, X consists of many packages. Once you've installed the necessary packages, you're ready to configure X. WARNING: You should exercise due care while configuring X to run on your system. If you incorrectly or incompletely configure X, your system can be permanently damaged. In particular, if you configure your monitor for a refresh rate that exceeds its capacity, you can damage the monitor. Older fixed-frequency monitors are particularly susceptible to such damage. The author and publisher have taken pains to make this chapter clear and accurate, but their efforts don't ensure that the procedure presented in this chapter will work correctly with your hardware. Consequently, the author and publisher cannot be held responsible for damages resulting from a faulty installation or configuration of X. If you have a card or monitor of unknown manufacture or model, and feel that you must guess, at least start with a narrow range of middle values, and gradually expand that range to see if you can find a value that works. Don't let a monitor that displays an unstable or garbled image run any longer than the time it takes you to cut power to the monitor 5.3 Configuring X When you install the xserver-common package, xf86config is automatically launched. However, you can launch the program any time you like. To do so, log in as root and type the command: xf86config Figure 5.1 shows the beginning of the xf86config dialog. As you can see, xf86config is a text-mode program; it does not support use of the mouse and it presents its questions teletype-style, using black-and-white text. In working with xf86config, you may find that your Backspace key doesn't work as expected. If so, use Ctrl-Backspace instead. Figure 5.1: The beginning of the xf86config dialog Next, xf86config asks you to specify the type of mouse attached to your system, as shown in Figure 5.2. Type the number associated with your choice, and press Enter. For non-mouse pointing devices found on many laptops, you should most likely select PS/2 Mouse. Figure 5.2: Specifying the mouse type If you selected the Logitech MouseMan mouse, you should enable its third button by responding y to the question asking whether ChordMiddle should be enabled, as shown in Figure 5.3. Figure 5.3: Specifying the ChordMiddle option If your mouse has only two buttons, you should enable emulation of a three- button mouse by responding y to the question asking about Emulate3Buttons, as shown in Figure 5.4. If you enable this option you can simultaneously press both the buttons of your mouse to emulate pressing the third button. Figure 5.4: Specifying emulation of a three-button mouse Next, you must specify the device file associated with the mouse, as shown in Figure 5.5. The install program should have associated your system's mouse with the device /dev/mouse, which is the default choice. Simply press Enter to continue. Figure 5.5: Specifying the mouse device As described by the output shown in Figure 5.6, X provides special support for using extended keyboards. If you use a special keyboard layout to support national characters, you can type y to use xkb, which simplifies changing the keyboard map. After making your choice, press Enter to continue. Figure 5.6: Specifying use of the keyboard extension As shown in Figure 5.7, xkb supports a variety of keyboard encodings, or keymaps. Type the number that corresponds to the type of keyboard attached to your system, and press Enter. Figure 5.7: Specifying the keymap Next, as shown in Figure 5.8, you must specify two characteristics of your system's monitor: its vertical refresh rate (VertRefresh) and horizontal sync rate (HorizSync). You can find these values by:  Consulting your monitor's documentation  Consulting the file /usr/doc/xserver-common/Monitors.gz, which may list your monitor. Use gunzip to uncompress the file and ae or another text editor to view it.  Viewing the monitor's manufacturer's web support page  Posting a question to the newsgroup comp.os.linux.setup  Contacting the monitor manufacturer's technical support group and requesting the information To specify the monitor's characteristics, press Enter. Figure 5.8: Preparing to specify monitor characteristics First, you must specify the horizontal sync rate of your monitor, as shown in Figure 5.9. Type the number associated with your choice and press Enter. If you're unsure of your monitor's horizontal sync range, but certain that it supports 800×600 resolution, specify range 2. To specify a range other than those listed, you can select choice 11; if you do so, you'll be prompted to enter the low and high values of the horizontal sync range. WARNING: Often, otherwise similar monitor models have different horizontal sync rates. It is crucial that you accurately determine the horizontal sync rate of your monitor. If you configure X to use an inappropriate horizontal sync rate, you can permanently damage your monitor. Figure 5.9: Specifying the horizontal sync rate Next, as shown in Figure 5.10, you must specify the vertical sync (refresh) rate. Type the number associated with your choice and press Enter. If you're unsure of your monitor's vertical sync range, specify range 1, which is the most conservative. To specify a range other than those listed, you can select choice 5; if you do so, you'll be prompted for the low and high values of the vertical sync range. Figure 5.10: Specifying the vertical sync rate You must now specify identification and description strings for your monitor, as shown in Figure 5.11. You can enter any text you like. Press Enter after typing each string. Figure 5.11: Specifying the monitor identification and description strings Next, you must specify your video card and its characteristics. The explanations provided by xf86config, shown in Figure 5.12, point out that you can choose to select your card from a database. However, even if you do so, you'll be given the opportunity to specify non-standard values. Unless you have a specific reason for doing so, you should not override the values in the database. Moreover, you should be careful to choose only the database entry that exactly matches your card; cards having similar model names may have significantly different hardware characteristics. [...]... improve the accuracy of the clock timings by running the probe yourself after xf86config is done and adding an appropriate Clocks line to your X configuration Consult the X documentation for information on how to do so Otherwise, you should let xf86config probe your system to determine appropriate clock settings: type y and press Enter to begin the probe WARNING: If xf86config probes your system and the. .. prefer, you can type n and specify a different directory or filename Figure 5.23: Writing the configuration file Once the file has been written, you're ready to start X 5.4 Starting and Stopping X Now that you've configured X by using xf86config, you're probably eager to see it work To start X, type the command: startx Your system' s screen should briefly go blank and then you should see X' s graphical desktop... Using the X Window System, will teach you how to use X effectively WARNING: If the screen is garbled or remains blank for more than about 30 seconds, your X configuration may be faulty Immediately turn off your monitor or terminate X by pressing Ctrl-Alt-Backspace To exit X, click on an unused part of the desktop and a pop-up menu will appear From the menu, select the Exit, Logout, or Quit menu item X. .. Figure 5.16, xf86config asks whether it should change the first line of the /etc /X1 1/server file to point to your server Respond by typing y and pressing Enter Figure 5.16: Setting the default server Now, as shown in Figure 5.17, specify the amount of memory installed on your video card by typing the appropriate number and pressing Enter You can determine the amount of memory by examining the documentation... back to the beginning Figure 5.13: Examining the card database After you choose your video card, xf86config reports your choice As in Figure 5.14, xf86config may provide instructions, such as "Do NOT probe clocks." It's a good idea to write these down so that you remember to observe them even after they've scrolled off the screen Figure 5.14: The selected card definition Next, you must specify the X server... change the resolutions allowed when operating at a given color depth by typing the number associated with the color depth and specifying the desired resolution or resolutions Figure 5.22: Specifying the modes Finally, as shown in Figure 5.23, xf86config is ready to write the configuration file it has prepared Generally, you should let it write the file to /etc /X1 1/XF86Config; simply type y and press... immediately cancel the probe by turning off the monitor, pressing Ctrl-C, and restoring power to your monitor If the probe fails, it can permanently damage your monitor Figure 5.21: Beginning the automatic probe Next, you can specify the color depths and resolutions in which X will operate, as shown in Figure 5.22 Generally, xf86config's default choices are appropriate: you can type 5 and press Enter... q and press Enter to continue; otherwise type the number associated with your card's programmable clock chip and press Enter Figure 5.20: Specifying the clock chip As shown in Figure 5.21, xf86config asks you to let it probe your system to determine proper clock timings If you specified a programmable clock chip, you should omit the probe; type n and press Enter to continue You should also omit the. .. to determine the appropriate server Type the number associated with the server and press Enter to continue If you specify choice 4, you'll be prompted to specify which accelerated server you want to use If you're in doubt, specify server 3, the XF86_SVGA server; unless your video card or monitor are quite old, they're likely to support 256color SVGA Figure 5. 15: Specifying the server Next, as shown... 5.12: Preparing to examine the card database Figure 5.13 shows the screen you use to choose your card Simply type the number associated with your card and press Enter If you suspect that your card appears on a subsequent page, press q to page forward through the database If you accidentally page past your card, simply continue moving forward; when the program reaches the last entries of the database, it . Installing and Configuring the X Window System This chapter helps you install, configure, and use the X Window System (often known simply as X) . Once X. 5.1 What is X? X is the standard graphical user interface for Linux. Like other graphical user interfaces such as Microsoft Windows and Mac OS, X lets you

Ngày đăng: 07/11/2013, 10:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan