Learning DebianGNU Linux-Chapter 5: Installing and Configuring the X Window System
Mô tả tài liệu
Tham khảo tài liệu 'learning debiangnu linux-chapter 5: installing and configuring the x window system', công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Tóm tắt nội dung
5. and the X Window System This chapter helps you install, 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 the of X. 5.1 What is X? X is the standard graphical user interface for Linux. Like other graphical user 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 with your computer. as a effort of Digital Equipment and Institute of X was first released in 1987. the X Inc. became for the and of X. Despite its age, X is a and very modern software system: a graphical user It runs on a wide variety of including every variety of Unix. X Clients are for use, for example, under Windows 3.x, 9x, and NT. The of X let you run a program on one while viewing the graphical output on another computer, to the first via a network. With the advent of the Internet, which a sizable fraction of the computers on the planet, X achieved a new height of and power. Most Linux users run XFree86, a freely available software system with X. XFree86 was developed by the XFree86 software team, which began work in 1992. In 1994, The XFree86 Project assumed for ongoing research and of XFree86. 5.2 X Getting a proper X Window System up and running used to be a real on Linux, almost a rite of passage. Today, device drivers are for a much wider array of hardware, and tools to assist in the setup process have greatly improved. While still tricky at times - with unusual hardware - X setup and is no longer the daunting process it once was, and should be easy. You'll go through two stages before you have X running. The first stage involves the needed programs that enable X to run. These can be grouped into several Basic XFree86 program X servers Window Managers Fonts This stage is very and can even be done as part of the basic 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 an X server with your graphics card, and tuning the server for your graphics card. If you have a common card and all the for it, this second stage will be simple. Missing makes the process harder, but not As shown in Appendix C, The Debian Package X of many packages. Once you've installed the necessary packages, you're ready to configure X. You should exercise due care while X to run on your system. If you or configure X, your system can be damaged. In if you configure your monitor for a refresh rate that exceeds its capacity, you can damage the monitor. Older monitors are to such damage. The author and publisher have taken pains to make this chapter clear and but their efforts don't ensure that the procedure presented in this chapter will work correctly with your hardware. the author and publisher cannot be held for damages resulting from a faulty or of X. If you have a card or monitor of unknown or model, and feel that you must guess, at least start with a narrow range of middle values, and 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 X When you install the package, is launched. However, you can launch the program any time you like. To do so, log in as root and type the command: Figure 5.1 shows the beginning of the dialog. As you can see, is a text-mode program; it does not support use of the mouse and it presents its questions using text. In working with you may find that your Backspace key doesn't work as expected. If so, use instead. Figure 5.1: The beginning of the dialog Next, asks you to specify the type of mouse attached to your system, as shown in Figure 5.2. Type the number with your and press Enter. For non-mouse pointing devices found on many you should most likely select PS/2 Mouse. Figure 5.2: the mouse type If you selected the Logitech MouseMan mouse, you should enable its third button by y to the question asking whether should be enabled, as shown in Figure 5.3. Figure 5.3: the option If your mouse has only two buttons, you should enable emulation of a mouse by y to the question asking about as shown in Figure 5.4. If you enable this option you can press both the buttons of your mouse to emulate pressing the third button. 5.4: emulation of a mouse Next, you must specify the device file with the mouse, as shown in Figure 5.5. The install program should have your system's mouse with the device which is the default choice. Simply press Enter to continue. Figure 5.5: the mouse device As described by the output shown in Figure 5.6, X provides special support for using extended If you use a special keyboard layout to support national you can type y to use xkb, which the keyboard map. After making your choice, press Enter to Figure 5.6: use of the keyboard extension As shown in Figure 5.7, xkb supports a variety of keyboard or Type the number that to the type of keyboard attached to your system, and press Enter. Figure 5.7: the keymap Next, as shown in Figure 5.8, you must specify two of your monitor: its vertical refresh rate and sync rate You can find these values by: your monitor's the file which may list your monitor. Use gunzip to the file and ae or another text editor to view it. Viewing the monitor's web support page Posting a question to the newsgroup the monitor technical support group and the To specify the monitor's press Enter. Figure 5.8: Preparing to specify monitor First, you must specify the sync rate of your monitor, as shown in Figure 5.9. Type the number with your choice and press Enter. If you're unsure of your monitor's sync range, but certain that it 800×600 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 sync range. Often, otherwise similar monitor models have different sync rates. It is crucial that you determine the sync rate of your monitor. If you configure X to use an sync rate, you can damage your 5.9: the sync rate Next, as shown in Figure 5.10, you must specify the vertical sync (refresh) rate. Type the number with your choice and press Enter. If you're unsure of your monitor's vertical sync range, specify range 1, which is the most 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 sync range. Figure 5.10: the vertical sync rate You must now specify and strings for your as shown in Figure 5.11. You can enter any text you like. Press Enter after typing each string. Figure 5.11: the monitor and strings Next, you must specify your video card and its The provided by 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 to specify 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 entry that exactly matches your card; cards having similar model names may have different hardware 5.12: Preparing to examine the card database Figure 5.13 shows the screen you use to choose your card. Simply type the number with your card and press Enter. If you suspect that your card appears on a page, press q to page forward through the If you page past your card, simply continue moving when the program reaches the last entries of the database, it cycles back to the Figure 5.13: Examining the card database After you choose your video card, reports your choice. As in Figure 5.14, may provide 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 Next, you must specify the X server you want to use, as shown in Figure 5.15. Consult Table C.1 to determine the server. Type the number with the server and press Enter to continue. If you specify choice 4, you'll be prompted to specify which 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 SVGA. 5.15: the server Next, as shown in Figure 5.16, asks whether it should change the first line of the 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 number and pressing Enter. You can determine the amount of memory by examining the that your card. If you cannot locate the try a small value, such as 1024K. choosing too small a value will merely prevent your card from operating at high however, choosing too large a value may cause the card to 5.17: the amount of video memory Just as you specified text strings that identify and describe your you should now specify strings that identify and describe your video card, as shown in Figure 5.18. Press Enter after typing each string. Figure 5.18: the video card and strings If you selected an server, you can now enter the RAMDAC as shown in Figure 5.19. Some SVGA servers also support If you're not using an server, you can simply type q and press Enter to omit of a RAMDAC. type the number with the RAMDAC used by your card and press Enter. the correct number may pose a bit of a puzzle. The given in the screen specify RAMDAC chips used on cards. If you can view your card, you can inspect it to see if it contains any of the listed chips. If it's not to view your card, type q and press Enter to omit of a RAMDAC. X will most so omitting the will not likely impair the of your video hardware. Figure 5.19: the RAMDAC settings Next, as shown in Figure 5.20, you can specify the clock chip used by your video card. Most video cards lack such a chip; such cards require a Clocks line in the X file. If your video card lacks a clock chip, type q and press Enter to continue; otherwise type the number with your card's clock chip and press Enter. 5.20: the clock chip As shown in Figure 5.21, asks you to let it probe your system to determine proper clock timings. If you specified a clock chip, you should omit the probe; type n and press Enter to continue. You should also omit the probe if you earlier noted that probing is not for your card. You can sometimes improve the accuracy of the clock timings by running the probe yourself after is done and adding an Clocks line to your X Consult the X for on how to do so. you should let probe your system to determine clock settings: type y and press Enter to begin the probe. If probes your system and the screen remains black for more than 30 seconds, cancel the probe by turning off the monitor, pressing Ctrl-C, and restoring power to your monitor. If the probe fails, it can damage your monitor. Figure 5.21: Beginning the automatic probe Next, you can specify the color depths and in which X will as shown in Figure 5.22. default choices are you can type 5 and press Enter to continue. However, you can change the allowed when operating at a given color depth by typing the number with the color depth and the desired or 5.22: the modes as shown in Figure 5.23, is ready to write the file it has prepared. you should let it write the file to simply type y and press Enter. However, if you prefer, you can type n and specify a different directory or filename. Figure 5.23: Writing the file Once the file has been written, you're ready to start X. 5.4 Starting and Stopping X Now that you've X by using 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 desktop. Chapter 6, Using the X Window System, will teach you how to use X If the screen is garbled or remains blank for more than about 30 seconds, your X may be faulty. turn off your monitor or terminate X by pressing 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 shuts down, returning you to the familiar interface of the Linux shell prompt.