The information in Chapter 6 should be enough to get X up and running. There's a lot more to X than that, however, enough to fill many books. In this chapter we'll look at some of the more interesting topics:
Setting up your XF86Config file normally takes a few minutes, but sometimes you can run into problems that make grown men cry. In the rest of this chapter, we'll look at the technical background:
I mean the last point seriously: conventional wisdom says that you can't
You don't have to be a computer expert to see the similarity between monitors and TVs: current monitor technology is derived from TV technology, and many older display boards have modes that can use TVs instead of monitors. Those of us who were on the
There are at least two ways to create pictures on a
TVs and monitors display the picture by scanning equally spaced lines across the entire screen. Like in a book, the first line starts at the top left of the screen and goes to the top right. Each successive line starts slightly below the previous line. This continues until the screen is full. The picture is formed by altering the
To perform this scan, the TV has two deflection units: one scans from left to right, and the other scans, much more slowly, from top to bottom. Not surprisingly, these units are called the horizontal and vertical
Figure 28-1 shows the resultant pattern.
(рис 28.1) Scanning pattern on the monitor
The tube can only move the
(рис 28.2) Scan line and register values
The register information at the bottom of the picture refers to the video
That, in a nutshell, is how horizontal
So how do we apply this to computer displays? Let's look at the US standard
The first problem is
The second problem is the resolution: nowadays, 1024x768 is a minimum resolution, and some monitors display up to 2048x1536 pixels. On the other hand, even 60Hz
Remember that a monitor is just a glorified TV? Well, one of the
You don't have to roll your own X configuration to burn out the monitor: 20 years ago, the standard display boards were
All modern PC monitors handle at least a range of
Never run your monitor out of spec. If your display is messed up, there's a good chance that the frequencies are out, so turn off the monitor.
Monitors aren't the only thing that you can burn out, of course. If you try hard, you can also burn out chips on some display boards by running them at frequencies that are out of spec. In practice, though, this doesn't happen nearly as often.
Another difference between TVs and monitors is the kind of signal they take. A real TV includes a receiver, of course, so you have an
The
The first part of the
In addition, the Start Horizontal Blanking and End Horizontal Blanking registers (SHB and EHB) define when the video signals are turned off and on. The server sets these registers automatically, so we don't need to look at them in more detail.
The control of the vertical
VGA hardware evolved out of older 8 bit character-based display hardware, which counted lines in characters, not
One of the steps in setting up XFree86 is to define these register values. Fortunately, you don't have to worry about which bits to set in the overflow register: the mode lines count in dots, and it's up to the server to convert the dot count into something that the display board can understand. A typical Mode line looks like:
Modeline "640x480a" 28 640 680 728 776 480 480 482 494
These ten values are required. In addition, you may specify modifiers at the end of the line. The values are:
This is pretty dry stuff. To make it easier to understand, let's look at how we would set a typical VGA display with 640x480 pixels. Sure, you can find values for this setup in any release of XFree86, but that doesn't mean that they're the
First, we need to create our lines. They contain 640 pixels, two porches and a sync
Horizontal sync
As we'll see, the proof of these timing parameters is in the display. If the display looks good, the parameters are OK. I don't know of any way to
For our example, let's stick to 2 $$\mu s$$ per value. We have a
You now need to calculate four register values to define the horizontal lines:
At this point, our vestigial mode line looks like:
Modeline "640x480" 28 640 704 768 832
Next, we need another four values to define the vertical scan. Again, of the four values we need, we only know the number of lines. How many lines do we use for the porches and the vertical sync? As we've seen,
To figure that out, we need to know our real
To get the highest
Now our mode line is complete:
Modeline "640x480" 28 640 704 768 832 480 481 483 493
Now we can calculate our
If you know the technical details of your monitor and display board, it really is that simple. This method doesn't require much thought, and it creates results that work.
Note that the resultant mode line may not work on other monitors. If you are using a
The main configuration file for XFree86 is called XF86Config. It has had a long and varied journey through the file system. At the time of writing, it's located at /usr/X11R6/lib/X11/XF86Config, but previously it has been put in /etc/X11/XF86Config, /etc/XF86Config or /usr/X11R6/etc/X11/XF86Config, and the server still looks for it in many of these places. If you're upgrading a system, you should ensure that you don't have old configuration files in one of the alternative places.
As we saw on page 102, there are a couple of ways to automatically create an XF86Config file. On that page we saw how to do it with x/86c/g. An alternative way is to run the X server in configuration mode:
# X-configure
XFree86 Version 4.2.0 / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 18 January 2002
If the server is older than 6-12 months, or if your card is
newer than the above date, look for a newer version before
reporting problems. (See http://www.XFree86.Org/)
Build Operating System: FreeBSD 5.0-CURRENT i386 [ELF]
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log ", Time: Sat Apr 613:51:10 2002
List of video drivers:
atimisc
(the list is long,and will change; it'somitted here)
(++) Using config file: "/root/XF86Config.new "
Your XF86Config file is /root/XF86Config.new
To test the server, run "XFree86 -xf86config /root/XF86Config.new "
Note that X does not place the resultant configuration file in the default location. The intention is that you should test it first and then move it to the final location when you're happy with it. As generated above, it's good enough to run XFree86, but you'll possibly want to change it. For example, it only gives you a single resolution, the highest it can find. In this section we'll look at the configuration file in more detail, and how to change it.
XF86Config is divided into several sections, as shown in Table 28-1 . We'll look at them in the order they appear in the generated XF86Config file, which is not the same order as in the man page.
| Section | Description |
|---|---|
| ServerLayout | Describes the overall layout of the X configuration. X can handle more than one |
| Files | Sets the |
| ServerFlags | Set some global options. |
| Module | Describes the software modules to load for the configuration. |
| InputDevice | Sets up keyboards, mice and other |
| Monitor | Describes your monitor to the server. |
| Device | Describes your |
| Screen | Describes how to use the monitor and |
| Device | Describes your |
| Screen | Describes how to use the monitor and |
The ServerLayout section describes the relationships between the individual hardware components under the control of an X server. For typical hardware, X -configure might generate:
Section "ServerLayout "
Identifier "XFree86 Configured "
Screen 0 "Screen0 " 0 0
InputDevice "Mouse0 " "CorePointer "
InputDevice "Keyboard0 " "CoreKeyboard "
EndSection
This shows that the server has one screen and two Mouse0 and Keyboard0 suggest that they're a mouse and a keyboard, but any name is valid. These entries are pointers to sections elsewhere in the file, which must contain definitions for Screen0, Mouse0 and Keyboard0.
Normally you only have one screen, one mouse and one keyboard, so this section might seem rather
The Files section of the XF86Config file contains the path to the RGB
The
Section "Files "
RgbPath "/usr/X11R6/lib/X11/rgb "
ModulePath "/usr/X11R6/lib/modules "
FontPath "/usr/X11R6/lib/X11/fonts/misc/ "
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/ "
FontPath "/usr/X11R6/lib/X11/fonts/Type1/ "
FontPath "/usr/X11R6/lib/X11/fonts/CID/ "
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/ "
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/ "
EndSection
If you are running a
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/ " FontPath "/usr/X11R6/l:Lb/X11/ionts/75dpi/ " EndSection
Don't just remove the 75 dpi fonts: some fonts may be available only in the 75 dpi directory.
Sometimes the server complains:
Can't open default font 'fixed'
This is almost certainly the result of an invalid entry in your font path. Try running mkfontdir in each directory if you are certain that each one is correct. The XF86Config man page describes other parameters that may be in this section of the file.
The ServerFlags section allows you to specify a number of global options. By default it is not present, and you will probably not find any reason to set it. See the man page XF86Config(5) for details of the options.
The Module section describes binary modules that the server loads:
Section "Module "
Load "extmod "
Load "xie "
Load "pex5 "
Load "glx "
Load "GLcore "
Load "dbe "
Load "record "
Load "type1 "
EndSection
We won't look at modules in more detail; see the XFree86 documentation.
The InputDevice section specifies each XF86Config looks something like this:
Section "InputDevice "
Identifier "keyboard0 "
Identifier "keyboard "
EndSection
Section "InputDevice "
Identifier "Mouse0 "
Driver "mouse "
Option "Protocol " "auto "
Option "Device " "/dev/mouse "
EndSection
There's not much to be said for the keyboard. Previous versions of XFree86 allowed you to set things like NumLock handling and repeat rate, but the former is no longer needed, and the latter is easier to handle with the xset program.
Mice are still not as standardized as keyboards, so you still need a Protocol line and a device name. The defaults shown here are correct for most modern mice; the
If you're using a Emulate3Buttons option. That's all described in the man page, but in general it's easier to use moused.
Next comes the description of the monitor. Modern monitors can identify themselves to the system. In that case, you get a section that looks like this:
Section "Monitor "
Identifier "Monitor0 "
VendorName "IBM "
ModelName "P260 "
HorizSync 30.0-121.0
VertRefresh 48.0-160.0
This tells the server that the monitor is an IBM P260, that it can handle
Section "Monitor "
Identifier "MonitorO "
VendorName "Monitor Vendor "
ModelName "Monitor Model "
EndSection
This may seem like no information at all, but in fact it does give the identifier. Before you use it, you should add at least the horizontal and
This is also the place where you can add mode lines. For example, if you have created a mode line as described in the first part of this chapter, you should add it here:
Section "Monitor "
Identifier "right "
VendorName "iiyama "
ModelName "8221T "
HorizSync 24.8-94.0
VertRefresg 50.0-160.0
ModeLine "640x480 " 73 640 672 768 864 480 488 494 530
# 62 Hz!
ModeLine "800x600 " 111 800 864 928 1088 600 604 610 640
# 143 Hz
ModeLine "1024x768 " 165 1024 1056 1248 1440 768 771 781 802
# 96 Hz
ModeLine "1280x1024 " 195 1280 1312 1440 1696 1024 1031 1046 1072 -hsync -vsync
# 76 Hz
ModeLine "1600x1200 " 195 1600 1616 1808 2080 1200 1204 1207 1244+hsync +vsync
# 56 Hz
ModeLine "1600x1200 " 200 1920 1947 2047 2396 1440 1441 1444 1483 - hsync +vsync
# 61 Hz
ModeLine "1600x1200 " 220 1920 1947 2047 2448 1440 1441 1483- hsync +vsync
EndSection
It's possible to have multiple mode lines for a single frequency, and this even makes sense. The examples for 1920x1440 above have different pixel clocks. If you use this monitor with a card with a pixel clock that only goes up to 200 MHz, the server chooses the first mode line. If you use a card with up to 250 MHz pixel clock, it uses the second and gets a better page
The X server has a number of built-in mode lines, so it's quite possible to have a configuration file with no mode lines at all. The names correspond to the resolutions, and there can be multiple mode lines with the same name. The server chooses the mode line with the highest frequency compatible with the hardware.
The Device section describes the
Section "Device "
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True "/ "False ",
### <string>: "String ", <freq>: "<f> Hz/kHz/MHz "
### [arg]: arg optional
#Option "SWcurcor " #[<bool>]
#Option "HWcursor " #[<bool>]
#Option "PciRetry " #[<bool>]
#Cption "SyncOnGreen " #[<bool>
#Option "NoAcce " #[<bool>
#Option "ShowCache " #[<bool>
#Option "Overlay " #[<str>]
#Option "MGASDRAM " #[<bool>
#Option "ShadowFB " #[<bool>
#Option "UseFBDev " #[<bool>
#Option "ColorKey " #<i>
#Option "SetMclk " #<freq>
#Option "OverclockMem " #[<bool>
#Option "VideoKey " #<i>
#Option "Rotate quot " #[<str>]
#Option "TexturedVideo " #[<bool>
#Option "Crtc2Half " #[<bool>
#Option "Crtc2Ram " #<i>
#Option "Int10 " #[<bool>
#Option "AGPMode " #<i>
#Option "DigitalScreen " #[<bool>
#Option "TV " #[<bool>
#Option "TVStandard " #[<str>]
#Option "CableType " #[<str>]
#Option "NoHal " #[<bool>
#Option "SwappedHead " #[<bool>
#Option "DRI " #[<bool>
Identifier "Card0 "
Driver "mga "
VendorName "Matrox "
BoardName "MGA G200 AGP "
BusID "PCI:1:0:0 "
EndSection
This example shows a Matrox G200 #). Many of these options are board dependent, and none of them are required. See the X documentation for more details.
Note particularly the last line, BusID. This is a hardware-related address that tells the X server where to find the display board. If you move the board to a different PCI slot, the address will probably change, and you will need to re-run X-configure to find the new busID.
If your display board is older, much of this information will not be available, and you'll have to add it yourself. Unlike older monitors, it's hardly worth worrying about older boards, though: modern boards have become extremely cheap, and they're so much faster than older boards that it's not worth the trouble.
The final section is the Screen section, which describes the display on a monitor. The default looks something like this:
Section "Screen "
Identifier "Screen0 "
Device "Card0 "
Monitor "Monitor0 "
SubSection "Display "
Depth 1
EndSubSection
SubSection "Display "
Depth 4
EndSubSection
Subsection "Display "
Depth 8
EndSubSection
SubSection "Display "
Depth 15
EndSubSection
SubSection "Display "
Depth 16
EndSubSection
SubSection "Display "
Depth 24
EndSubSection
EndSection
The first three lines describe the relationship between the screen display, the
Section "Screen "
Identifier "Screen0 "
Device "Card0 "
Monitor "Monitor0 "
DefaultDepth 24
SubSection "Display "
Depth 24
Modes "2048x1536 " "1600x1200 " "1024x768 " "640x480 "
EndSubSection
EndSection
This section includes a DefaultDepth entry for the sake of example. In this case, it's not strictly needed, because there's only one pixel depth. If there were more than one Display subsection, it would tell xinit which depth to use by default.
We've seen above that X provides for more than one monitor per server. If you have multiple display cards and monitors, let the server generate the XF86Config file: it generates a file that supports all identified devices. The resultant server layout section might look like this:
Section "ServerLayout "
Identifier "XFree86 Configured "
Screen 0 "Screen0 " 0 0
Screen 1 "Screen1 " RightOf "Screen0 "
Screen 2 "Screen2 " RightOf "Screen1 "
InputDevice "Mouse0 " "CorePointer "
InputDevice "Keyboard0 " "CoreKeyboard "
EndSection
The file will also have multiple monitor, device and screen sections. The server can't know about the real physical layout of the screen, of course, so you may have to change the ordering of the screens. When you run the server without any other specifications, it is assigned server number 0, so these screens will be numbered :0.0, :0.1 and :0.2.
It's also possible to run more than one X server on a single system, even if it only has a single monitor. There can be some good reasons for this: you may share a system amongst your family members, so each of them can have their own server. Alternatively, you may have a
For each server, you require one
xinit xinit .xinitrc-kde - - :1 xinit .xinitrc-gnome - - :2 -xf86config XF86Config.1024x768
Due to different command line options, you must use xinit here, and not startx. The first xinit starts a server with the default options: it reads its commands from .xinitrc, it has the server number 0, and it reads its configuration from the default XF86Config file. The second server reads its commands from .xinitrc-kde, it has the server number 1, and it reads its configuration from the default XF86Config file. The third server reads its commands from .xinitrc-gnome, it has the server number 2, and the configuration file is XF86Config.1024x768. Assuming that you reserve virtual terminals /dev/ttyv7, /dev/ttyv8 and /dev/ttyv9 for the servers, you can switch between them with the key combinations Ctrl-Alt-F8, Ctrl-Alt-F9 and Ctrl-Alt-F10.
X is a network protocol. So far we have looked at the server. The clients are the individual programs, such as xterm, emacs or a web browser, and they don't have to be on the same machine. A special notation exists to address X servers and screens:
System name: server number .screen number
When looking at X client-server interaction, remember that the server is the software component that manages the display. This means that you're always sitting at the server, not at the client. For example, if you want to start an xterm client on freebie and display it on presto, you'll be sitting at presto. To do this, you could type in, on presto,
$ ssh freebie xterm -ls -display presto:0
The fag -ls tells xterm that this is a login shell, which causes it to read in the startup files.
For this to work, you must tell the X server to allow the connection. There are two things to do:
$ xhost freebie presto bumble wait gw
This enables access from all the systems on our reference network, including the one on which it is run. You don't need to include your own system, which is enabled by default, but if you do, you can use the same script on all systems on the network.
-nolisten tcp. This completely blocks access from other systems. If you want to allow remote clients to access your X server, modify /usr/X11R6/bin/startx, which contains the text:
listen_tcp= "-nolisten tcp "
Change this line to read:
listen_tcp=
This enables remote connections the next time you start the server.
We saw above that a server can handle multiple monitors, and a system can handle multiple servers. One problem with multiple monitors is that most computers can only handle a small number of display boards: a single
If you have a number of machines located physically next to each other, you have the alternative of running X on each of them and controlling everything from one keyboard and mouse. You do this with the x11/x2x port. For example: freebie, presto and bumble have monitors next to each other, and presto has two monitors. From left to right they are freebie:0.0, presto: 0.0, presto:0.1 and bumble. 0.0. The keyboard and mouse are connected to presto. To incorporate freebie:0.0 and bumble:0.0 in the group, enter these commands on presto:
$ DISPLAY=:0.0 x2x -west -to freebie:0 $ DISPLAY=:0.1 x2x -east -to bumble:0
After this, you can move to the other machines by moving the mouse in the corresponding direction. It's not possible to continue to a further machine, but it is possible to connect in other directions (north and south) from each monitor on presto, which in this case would allow connections to at least six other machines. Before that limitation becomes a problem, you need to find space for all the monitors.
To stop X, press the key combination Ctrl-Alt-Backspace, which is deliberately chosen to resemble the key combination Ctrl-Alt-Delete used to reboot the machine. Ctrl-Alt-Backspace stops X and returns you to the
The information in Chapter 6 should be enough to get X up and running. There's a lot more to X than that, however, enough to fill many books. In this chapter we'll look at some of the more interesting topics:
Setting up your XF86Config file normally takes a few minutes, but sometimes you can run into problems that make grown men cry. In the rest of this chapter, we'll look at the technical background:
I mean the last point seriously: conventional wisdom says that you can't
You don't have to be a computer expert to see the similarity between monitors and TVs: current monitor technology is derived from TV technology, and many older display boards have modes that can use TVs instead of monitors. Those of us who were on the
There are at least two ways to create pictures on a
TVs and monitors display the picture by scanning equally spaced lines across the entire screen. Like in a book, the first line starts at the top left of the screen and goes to the top right. Each successive line starts slightly below the previous line. This continues until the screen is full. The picture is formed by altering the
To perform this scan, the TV has two deflection units: one scans from left to right, and the other scans, much more slowly, from top to bottom. Not surprisingly, these units are called the horizontal and vertical
Figure 28-1 shows the resultant pattern.
(рис 28.1) Scanning pattern on the monitor
The tube can only move the
(рис 28.2) Scan line and register values
The register information at the bottom of the picture refers to the video
That, in a nutshell, is how horizontal
So how do we apply this to computer displays? Let's look at the US standard
The first problem is
The second problem is the resolution: nowadays, 1024x768 is a minimum resolution, and some monitors display up to 2048x1536 pixels. On the other hand, even 60Hz
Remember that a monitor is just a glorified TV? Well, one of the
You don't have to roll your own X configuration to burn out the monitor: 20 years ago, the standard display boards were
All modern PC monitors handle at least a range of
Never run your monitor out of spec. If your display is messed up, there's a good chance that the frequencies are out, so turn off the monitor.
Monitors aren't the only thing that you can burn out, of course. If you try hard, you can also burn out chips on some display boards by running them at frequencies that are out of spec. In practice, though, this doesn't happen nearly as often.
Another difference between TVs and monitors is the kind of signal they take. A real TV includes a receiver, of course, so you have an
The
The first part of the
In addition, the Start Horizontal Blanking and End Horizontal Blanking registers (SHB and EHB) define when the video signals are turned off and on. The server sets these registers automatically, so we don't need to look at them in more detail.
The control of the vertical
VGA hardware evolved out of older 8 bit character-based display hardware, which counted lines in characters, not
One of the steps in setting up XFree86 is to define these register values. Fortunately, you don't have to worry about which bits to set in the overflow register: the mode lines count in dots, and it's up to the server to convert the dot count into something that the display board can understand. A typical Mode line looks like:
Modeline "640x480a" 28 640 680 728 776 480 480 482 494
These ten values are required. In addition, you may specify modifiers at the end of the line. The values are:
This is pretty dry stuff. To make it easier to understand, let's look at how we would set a typical VGA display with 640x480 pixels. Sure, you can find values for this setup in any release of XFree86, but that doesn't mean that they're the
First, we need to create our lines. They contain 640 pixels, two porches and a sync
Horizontal sync
As we'll see, the proof of these timing parameters is in the display. If the display looks good, the parameters are OK. I don't know of any way to
For our example, let's stick to 2 $$\mu s$$ per value. We have a
You now need to calculate four register values to define the horizontal lines:
At this point, our vestigial mode line looks like:
Modeline "640x480" 28 640 704 768 832
Next, we need another four values to define the vertical scan. Again, of the four values we need, we only know the number of lines. How many lines do we use for the porches and the vertical sync? As we've seen,
To figure that out, we need to know our real
To get the highest
Now our mode line is complete:
Modeline "640x480" 28 640 704 768 832 480 481 483 493
Now we can calculate our
If you know the technical details of your monitor and display board, it really is that simple. This method doesn't require much thought, and it creates results that work.
Note that the resultant mode line may not work on other monitors. If you are using a
The main configuration file for XFree86 is called XF86Config. It has had a long and varied journey through the file system. At the time of writing, it's located at /usr/X11R6/lib/X11/XF86Config, but previously it has been put in /etc/X11/XF86Config, /etc/XF86Config or /usr/X11R6/etc/X11/XF86Config, and the server still looks for it in many of these places. If you're upgrading a system, you should ensure that you don't have old configuration files in one of the alternative places.
As we saw on page 102, there are a couple of ways to automatically create an XF86Config file. On that page we saw how to do it with x/86c/g. An alternative way is to run the X server in configuration mode:
# X-configure
XFree86 Version 4.2.0 / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 18 January 2002
If the server is older than 6-12 months, or if your card is
newer than the above date, look for a newer version before
reporting problems. (See http://www.XFree86.Org/)
Build Operating System: FreeBSD 5.0-CURRENT i386 [ELF]
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log ", Time: Sat Apr 613:51:10 2002
List of video drivers:
atimisc
(the list is long,and will change; it'somitted here)
(++) Using config file: "/root/XF86Config.new "
Your XF86Config file is /root/XF86Config.new
To test the server, run "XFree86 -xf86config /root/XF86Config.new "
Note that X does not place the resultant configuration file in the default location. The intention is that you should test it first and then move it to the final location when you're happy with it. As generated above, it's good enough to run XFree86, but you'll possibly want to change it. For example, it only gives you a single resolution, the highest it can find. In this section we'll look at the configuration file in more detail, and how to change it.
XF86Config is divided into several sections, as shown in Table 28-1 . We'll look at them in the order they appear in the generated XF86Config file, which is not the same order as in the man page.
| Section | Description |
|---|---|
| ServerLayout | Describes the overall layout of the X configuration. X can handle more than one |
| Files | Sets the |
| ServerFlags | Set some global options. |
| Module | Describes the software modules to load for the configuration. |
| InputDevice | Sets up keyboards, mice and other |
| Monitor | Describes your monitor to the server. |
| Device | Describes your |
| Screen | Describes how to use the monitor and |
| Device | Describes your |
| Screen | Describes how to use the monitor and |
The ServerLayout section describes the relationships between the individual hardware components under the control of an X server. For typical hardware, X -configure might generate:
Section "ServerLayout "
Identifier "XFree86 Configured "
Screen 0 "Screen0 " 0 0
InputDevice "Mouse0 " "CorePointer "
InputDevice "Keyboard0 " "CoreKeyboard "
EndSection
This shows that the server has one screen and two Mouse0 and Keyboard0 suggest that they're a mouse and a keyboard, but any name is valid. These entries are pointers to sections elsewhere in the file, which must contain definitions for Screen0, Mouse0 and Keyboard0.
Normally you only have one screen, one mouse and one keyboard, so this section might seem rather
The Files section of the XF86Config file contains the path to the RGB
The
Section "Files "
RgbPath "/usr/X11R6/lib/X11/rgb "
ModulePath "/usr/X11R6/lib/modules "
FontPath "/usr/X11R6/lib/X11/fonts/misc/ "
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/ "
FontPath "/usr/X11R6/lib/X11/fonts/Type1/ "
FontPath "/usr/X11R6/lib/X11/fonts/CID/ "
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/ "
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/ "
EndSection
If you are running a
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/ " FontPath "/usr/X11R6/l:Lb/X11/ionts/75dpi/ " EndSection
Don't just remove the 75 dpi fonts: some fonts may be available only in the 75 dpi directory.
Sometimes the server complains:
Can't open default font 'fixed'
This is almost certainly the result of an invalid entry in your font path. Try running mkfontdir in each directory if you are certain that each one is correct. The XF86Config man page describes other parameters that may be in this section of the file.
The ServerFlags section allows you to specify a number of global options. By default it is not present, and you will probably not find any reason to set it. See the man page XF86Config(5) for details of the options.
The Module section describes binary modules that the server loads:
Section "Module "
Load "extmod "
Load "xie "
Load "pex5 "
Load "glx "
Load "GLcore "
Load "dbe "
Load "record "
Load "type1 "
EndSection
We won't look at modules in more detail; see the XFree86 documentation.
The InputDevice section specifies each XF86Config looks something like this:
Section "InputDevice "
Identifier "keyboard0 "
Identifier "keyboard "
EndSection
Section "InputDevice "
Identifier "Mouse0 "
Driver "mouse "
Option "Protocol " "auto "
Option "Device " "/dev/mouse "
EndSection
There's not much to be said for the keyboard. Previous versions of XFree86 allowed you to set things like NumLock handling and repeat rate, but the former is no longer needed, and the latter is easier to handle with the xset program.
Mice are still not as standardized as keyboards, so you still need a Protocol line and a device name. The defaults shown here are correct for most modern mice; the
If you're using a Emulate3Buttons option. That's all described in the man page, but in general it's easier to use moused.
Next comes the description of the monitor. Modern monitors can identify themselves to the system. In that case, you get a section that looks like this:
Section "Monitor "
Identifier "Monitor0 "
VendorName "IBM "
ModelName "P260 "
HorizSync 30.0-121.0
VertRefresh 48.0-160.0
This tells the server that the monitor is an IBM P260, that it can handle
Section "Monitor "
Identifier "MonitorO "
VendorName "Monitor Vendor "
ModelName "Monitor Model "
EndSection
This may seem like no information at all, but in fact it does give the identifier. Before you use it, you should add at least the horizontal and
This is also the place where you can add mode lines. For example, if you have created a mode line as described in the first part of this chapter, you should add it here:
Section "Monitor "
Identifier "right "
VendorName "iiyama "
ModelName "8221T "
HorizSync 24.8-94.0
VertRefresg 50.0-160.0
ModeLine "640x480 " 73 640 672 768 864 480 488 494 530
# 62 Hz!
ModeLine "800x600 " 111 800 864 928 1088 600 604 610 640
# 143 Hz
ModeLine "1024x768 " 165 1024 1056 1248 1440 768 771 781 802
# 96 Hz
ModeLine "1280x1024 " 195 1280 1312 1440 1696 1024 1031 1046 1072 -hsync -vsync
# 76 Hz
ModeLine "1600x1200 " 195 1600 1616 1808 2080 1200 1204 1207 1244+hsync +vsync
# 56 Hz
ModeLine "1600x1200 " 200 1920 1947 2047 2396 1440 1441 1444 1483 - hsync +vsync
# 61 Hz
ModeLine "1600x1200 " 220 1920 1947 2047 2448 1440 1441 1483- hsync +vsync
EndSection
It's possible to have multiple mode lines for a single frequency, and this even makes sense. The examples for 1920x1440 above have different pixel clocks. If you use this monitor with a card with a pixel clock that only goes up to 200 MHz, the server chooses the first mode line. If you use a card with up to 250 MHz pixel clock, it uses the second and gets a better page
The X server has a number of built-in mode lines, so it's quite possible to have a configuration file with no mode lines at all. The names correspond to the resolutions, and there can be multiple mode lines with the same name. The server chooses the mode line with the highest frequency compatible with the hardware.
The Device section describes the
Section "Device "
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True "/ "False ",
### <string>: "String ", <freq>: "<f> Hz/kHz/MHz "
### [arg]: arg optional
#Option "SWcurcor " #[<bool>]
#Option "HWcursor " #[<bool>]
#Option "PciRetry " #[<bool>]
#Cption "SyncOnGreen " #[<bool>
#Option "NoAcce " #[<bool>
#Option "ShowCache " #[<bool>
#Option "Overlay " #[<str>]
#Option "MGASDRAM " #[<bool>
#Option "ShadowFB " #[<bool>
#Option "UseFBDev " #[<bool>
#Option "ColorKey " #<i>
#Option "SetMclk " #<freq>
#Option "OverclockMem " #[<bool>
#Option "VideoKey " #<i>
#Option "Rotate quot " #[<str>]
#Option "TexturedVideo " #[<bool>
#Option "Crtc2Half " #[<bool>
#Option "Crtc2Ram " #<i>
#Option "Int10 " #[<bool>
#Option "AGPMode " #<i>
#Option "DigitalScreen " #[<bool>
#Option "TV " #[<bool>
#Option "TVStandard " #[<str>]
#Option "CableType " #[<str>]
#Option "NoHal " #[<bool>
#Option "SwappedHead " #[<bool>
#Option "DRI " #[<bool>
Identifier "Card0 "
Driver "mga "
VendorName "Matrox "
BoardName "MGA G200 AGP "
BusID "PCI:1:0:0 "
EndSection
This example shows a Matrox G200 #). Many of these options are board dependent, and none of them are required. See the X documentation for more details.
Note particularly the last line, BusID. This is a hardware-related address that tells the X server where to find the display board. If you move the board to a different PCI slot, the address will probably change, and you will need to re-run X-configure to find the new busID.
If your display board is older, much of this information will not be available, and you'll have to add it yourself. Unlike older monitors, it's hardly worth worrying about older boards, though: modern boards have become extremely cheap, and they're so much faster than older boards that it's not worth the trouble.
The final section is the Screen section, which describes the display on a monitor. The default looks something like this:
Section "Screen "
Identifier "Screen0 "
Device "Card0 "
Monitor "Monitor0 "
SubSection "Display "
Depth 1
EndSubSection
SubSection "Display "
Depth 4
EndSubSection
Subsection "Display "
Depth 8
EndSubSection
SubSection "Display "
Depth 15
EndSubSection
SubSection "Display "
Depth 16
EndSubSection
SubSection "Display "
Depth 24
EndSubSection
EndSection
The first three lines describe the relationship between the screen display, the
Section "Screen "
Identifier "Screen0 "
Device "Card0 "
Monitor "Monitor0 "
DefaultDepth 24
SubSection "Display "
Depth 24
Modes "2048x1536 " "1600x1200 " "1024x768 " "640x480 "
EndSubSection
EndSection
This section includes a DefaultDepth entry for the sake of example. In this case, it's not strictly needed, because there's only one pixel depth. If there were more than one Display subsection, it would tell xinit which depth to use by default.
We've seen above that X provides for more than one monitor per server. If you have multiple display cards and monitors, let the server generate the XF86Config file: it generates a file that supports all identified devices. The resultant server layout section might look like this:
Section "ServerLayout "
Identifier "XFree86 Configured "
Screen 0 "Screen0 " 0 0
Screen 1 "Screen1 " RightOf "Screen0 "
Screen 2 "Screen2 " RightOf "Screen1 "
InputDevice "Mouse0 " "CorePointer "
InputDevice "Keyboard0 " "CoreKeyboard "
EndSection
The file will also have multiple monitor, device and screen sections. The server can't know about the real physical layout of the screen, of course, so you may have to change the ordering of the screens. When you run the server without any other specifications, it is assigned server number 0, so these screens will be numbered :0.0, :0.1 and :0.2.
It's also possible to run more than one X server on a single system, even if it only has a single monitor. There can be some good reasons for this: you may share a system amongst your family members, so each of them can have their own server. Alternatively, you may have a
For each server, you require one
xinit xinit .xinitrc-kde - - :1 xinit .xinitrc-gnome - - :2 -xf86config XF86Config.1024x768
Due to different command line options, you must use xinit here, and not startx. The first xinit starts a server with the default options: it reads its commands from .xinitrc, it has the server number 0, and it reads its configuration from the default XF86Config file. The second server reads its commands from .xinitrc-kde, it has the server number 1, and it reads its configuration from the default XF86Config file. The third server reads its commands from .xinitrc-gnome, it has the server number 2, and the configuration file is XF86Config.1024x768. Assuming that you reserve virtual terminals /dev/ttyv7, /dev/ttyv8 and /dev/ttyv9 for the servers, you can switch between them with the key combinations Ctrl-Alt-F8, Ctrl-Alt-F9 and Ctrl-Alt-F10.
X is a network protocol. So far we have looked at the server. The clients are the individual programs, such as xterm, emacs or a web browser, and they don't have to be on the same machine. A special notation exists to address X servers and screens:
System name: server number .screen number
When looking at X client-server interaction, remember that the server is the software component that manages the display. This means that you're always sitting at the server, not at the client. For example, if you want to start an xterm client on freebie and display it on presto, you'll be sitting at presto. To do this, you could type in, on presto,
$ ssh freebie xterm -ls -display presto:0
The fag -ls tells xterm that this is a login shell, which causes it to read in the startup files.
For this to work, you must tell the X server to allow the connection. There are two things to do:
$ xhost freebie presto bumble wait gw
This enables access from all the systems on our reference network, including the one on which it is run. You don't need to include your own system, which is enabled by default, but if you do, you can use the same script on all systems on the network.
-nolisten tcp. This completely blocks access from other systems. If you want to allow remote clients to access your X server, modify /usr/X11R6/bin/startx, which contains the text:
listen_tcp= "-nolisten tcp "
Change this line to read:
listen_tcp=
This enables remote connections the next time you start the server.
We saw above that a server can handle multiple monitors, and a system can handle multiple servers. One problem with multiple monitors is that most computers can only handle a small number of display boards: a single
If you have a number of machines located physically next to each other, you have the alternative of running X on each of them and controlling everything from one keyboard and mouse. You do this with the x11/x2x port. For example: freebie, presto and bumble have monitors next to each other, and presto has two monitors. From left to right they are freebie:0.0, presto: 0.0, presto:0.1 and bumble. 0.0. The keyboard and mouse are connected to presto. To incorporate freebie:0.0 and bumble:0.0 in the group, enter these commands on presto:
$ DISPLAY=:0.0 x2x -west -to freebie:0 $ DISPLAY=:0.1 x2x -east -to bumble:0
After this, you can move to the other machines by moving the mouse in the corresponding direction. It's not possible to continue to a further machine, but it is possible to connect in other directions (north and south) from each monitor on presto, which in this case would allow connections to at least six other machines. Before that limitation becomes a problem, you need to find space for all the monitors.
To stop X, press the key combination Ctrl-Alt-Backspace, which is deliberately chosen to resemble the key combination Ctrl-Alt-Delete used to reboot the machine. Ctrl-Alt-Backspace stops X and returns you to the
Для получения официальных документов о завершении программы дополнительного профессионального образования (удостоверения о повышении квалификации, дипломов о профессиональной переподготовке и MBA) необходимо предоставить:
Внимание! Вы можете не заказывать доставку бумажной версии официального документы, а скачать его в электронном виде и распечатать самостоятельно. Информация о выданном документе в течение 1 месяца загружается в Федеральную информационную систему «Федеральный реестр сведений о документах об образовании и (или) о квалификации, документах об обучении» - ФИС ФРДО.
Доступ на новый сайт осуществляется с использованием адреса электронной почты, который был указан вами при регистрации на "старом". Мы постарались перенести все ваши данные с прежнего ресурса, однако не исключена вероятность потери части информации.
При возникновении проблемы со входом, воспользуйтесь функцией сброса пароля
Если вы обнаружите несоответствия, пожалуйста, сообщите нам.