Figure shows a twm menu called Twm , which is displayed by placing the pointer on the root window and holding down the first pointer button.
You generally display this menu by moving the pointer to the root window and pressing and holding down the first pointer button. In Figure , the arrow next to the menu title represents the pointer.
As you drag the pointer down the menu, each of the menu selections is highlighted. Regardless of the program, you generally select a menu item by dragging the pointer down the menu, highlighting the item you want, and releasing the pointer button. With other programs, particularly several other window managers, you can display a menu simply by placing the pointer on a particular part of the window, e.
A final note about the X display: in X, the terms display and screen are not equivalent. A display may consist of more than one screen. This feature might be implemented in several ways. There might be two physical monitors, linked to form a single display, as shown in Figure Alternatively, two screens might be defined as different ways of using the same display.
See Chapter 8 , Command Line Options , for more information on the -display option. Most window systems are kernel-based : that is, they are closely tied to the operating system itself and can only run on a discrete system, such as a single workstation.
The architecture of the X Window System is based on what is known as a client-server model. The system is divided into two distinct parts: display servers that provide display capabilities and keep track of user input, and clients , application programs that perform specific tasks. On a more basic level, the server acts as an intermediary between client application programs and the local display hardware.
The client programs make requests for information, processes, etc. Figure A display made up of two physical screens. This division within the X architecture allows the clients and the display server either to work together on the same machine or to reside on different machines possibly of different types, with different operating systems, etc.
For example, you might use a relatively low-powered PC or workstation as a display server to interact with clients that are running on a more powerful remote system. Even though the client program is actually running on the more powerful system, all user input and displayed output occur on the PC or workstation server and are communicated a across the network using the X protocol Figure shows a diagram of such a network.
There is another less obvious advantage to the client-server model: since the server is entirely responsible for interacting with the hardware, only the server program must be machine-specific. X client application programs can be ported easily from system to system. The X display server is a program that keeps track of all input coming from input devices, such as the keyboard and mouse, and input from any other clients that are running. As the display server receives information from a client, it updates the appropriate window on your display.
The display server may run on the same computer as a client or on an entirely different machine. Servers are available for PCs, workstations, and even for special terminals, which may have the server downloaded from another machine or stored in ROM.
X allows you to run many clients simultaneously. For example, you could be editing a text file in one window, compiling a program source file in a second window, reading your mail in a third, all the while displaying the system load average in a fourth window. While X clients may display their results and take input from a single display server, they may each be running on a different computer on the network. It is important to note that the same programs may not look and act the same on different servers since there is no standard user interface, since users can customize X clients differently on each server, and since the display hardware on each server may be different.
Several of the more frequently used client programs are discussed in the following paragraphs. The way a kernel-based window system operates is inherent in the window system itself. By contrast, the X Window System concentrates control in a window manager, several of which are available. The window manager you use largely determines the look and feel of X on a particular system.
The window manager shipped with the standard release of X from MIT is called twm. Prior to Release 4, the standard window manager shipped with X was uwm , the universal window manager. It defines basic policy intentionally omitted from X itself, such as the rules for transferring data between applications, for transferring keyboard focus, for installing colormaps, and so on. As long as applications and window managers follow the conventions outlined in the ICCCM, applications created with different toolkits will be able to coexist and work together on the same server.
Because uwm does not comply with the standards outlined in the ICCCM, it has been moved to a directory of user-contributed clients in Release 4, where it is still available for those who wish to use it. However, uwm is no longer officially supported by the X Consortium, and it should probably not be the window manager of choice.
If you are still using uwm , Appendix B , The uwm Window Manager , discusses getting started with and customizing this window manager. In this guide, we assume you are using twm. If the twm window manager has been customized at your site or you are using a different window manager, many of the concepts should still be the same.
However, the actual procedures shown may well differ. These are each located at the physical machine running the X server. The programs that access and use display resources are the clients. They may be on the same computer as the server, or they may be located down the hall, or they may be on the other side of the planet. One of the early tenets of the X Window developers was that X should provide a mechanism for implementing a GUI, but should not impose any policy on how that GUI should operate.
This has been both a blessing and a curse throughout the history of X. Since X does not define policy, the look and feel of applications has been left up to application and toolkit developers, and there is a tremendous variation between programs. The advantage is freedom to experiment and innovate; the disadvantage is confusion for users.
On one of my systems, I have three different calculators available: xcalc, kcalc , and gnome-calculator , as shown in Figure As you can see from this screen dump, each calculator looks different: the fonts, colors, button sizes, menu options, icons, and status bar vary from program to program.
They also use different visual effects when buttons are pressed. Fortunately, the toolkit developers have assumed responsibility for many policy issues, and programs based on the same toolkit generally operate in a consistent way.
Programs using different toolkits still behave differently, but the most popular toolkits have converged in their look and feel; notice the similarities between the 3D buttons and the fonts used by kcalc center and gnome-calculator right. There are three main toolkits currently in use, and desktop environments have been based upon each one:. Most of these desktop environments are distributed with a display manager, window manager, and some application clients, but you can mix and match components from different environments.
However, Motif continues to be an important toolkit for legacy applications, especially in some financial and scientific niche markets. Motif and OpenMotif are essentially the same product, distributed under different licenses. Therefore, Motif is not included in most open source operating systems. Motif is the last widely used toolkit based upon the X Intrinsics Toolkit Xt , an object-oriented library written in C.
All of these have fallen into disuse, but you may encounter them in older programs from time to time. All of these bases must be covered in order to produce a desktop environment that can compete with commercial offerings such as Microsoft Windows or Mac OS X. Recognizing this, developers have rallied around freedesktop. It generally has the following components:. The entire collection of hardware is called a display and is managed as a single unit, intended to be used by one person.
It is possible to have multiple displays connected to one computer, but a separate X server needs to be run for each display. Pointing devices fall into two general categories: relative and absolute :. These send only movement information to the display. A new pointer position is calculated by taking the previous pointer position and updating it with the indicated movement.
Mice, trackpads, and trackballs fall into this category. These send an exact screen position to the display. Touchscreens, graphics tablets, and light pens are all absolute devices. It is possible to have multiple pointing devices connected to one display. This is common on laptops; some have two built-in pointing devices, and some users add a traditional mouse to compliment a built-in pointing device.
The devices act in parallel, and any can be used to move the pointer on the screen Section 4. A display is rarely configured without a pointing device, but this may be done for an information-only display that does not permit user interaction. The data rate is very low, so USB pointing devices always run at low speed 1.
A few years ago, there were dozens of communication protocols used by mice. By far the most popular pointing technology is now the optical mouse.
Invented by Agilent formerly HP , an optical mouse contains a simple high-speed monochrome video camera, a Digital Signal Processor DSP , and interface electronics, all on a single chip. The video camera acquires images of the desk or mousepad at the minimum rate of 1, frames per second, and the DSP compares each frame with the previous frame to detect movement.
When movement is detected, it is communicated with the host computer through the interface electronics, which may be serialor radio-frequency-based RF.
Buttons and a rotary encoder for the scrollwheel round out the unit. Although optical mice outperform mechanical mice in most environments, they require a slightly textured or speckled surface to work well hence, the sudden popularity of speckled and woodgrain patterns on office furniture instead of the solid colors popular a few years ago.
The memory and raw processing capability of many modern optical mice exceeds that of the first computer used to run Unix! Like mice, keyboards are sometimes used in parallel. This is most common on lap-tops, where an add-on numeric keypad may be used along with the built-in key-board, or a larger external keyboard is used in preference to the internal one. The keyboard sends a scancode corresponding to a button location when that button is pressed, and sends another code when that button is released.
This permits the system to detect how long buttons are held down and in what combination. In order to convert these scancodes into characters, the system needs to know which symbol is associated with which key. This is done through a keyboard map. Since most English North American keyboards have a standard layout, one standard key-board map usually suffices; but outside of English North America, additional symbols will appear, either supplementing or replacing the English North American symbols.
For example, a U. Nonroman alphabets obviously have their own distinctive layouts as well, but typically provide some way to type roman letters for email addresses, URIs, and code.
Some languages use large numbers of accented characters. This handling is performed by the system and not by the processor in the actual keyboard, so the operation of dead keys can be reconfigured as needed. A compose key is a special type of dead key that builds a character based on two subsequent keypresses. The most complex keyboard input methods are required for Asian languages, which have very large alphabets of ideographs idea-pictures.
Input methods for Asian languages typically involve entering several keystrokes to phonetically or structurally describe the desired character; if this does not narrow down the selection to a single glyph, then the final selection is performed graphically.
Although these input methods require multiple keystrokes per character, each character conveys more meaning, so the average typing speed can be similar to that attained in languages with smaller alphabets. Most keyboards contain a simple microprocessor and a serial or USB interface, and have three LEDs to indicate keyboard status.
All video systems work by scanning dots or pixels —picture elements from left to right, top to bottom on the display. For each pixel on a color display, three pieces of information are sent: the individual brightness levels for the red, green, and blue RGB components of that dot. The monitor combines the appropriate amount of red, green, and blue light to form the specified color on the screen. Additional signals are used to synchronize the horizontal and vertical scanning so that pixels are drawn in the correct position.
CRT monitors draw pixels by shooting electron beams at colored phosphor dots coated onto the inside of the front glass panel, which then glow. It takes a significant amount of energy to create the electron beams, and X-rays are produced as a side effect.
In order to shield the user from these X-rays, a significant amount of lead is embedded into the glass of the CRT. Large electromagnets are used to bend the electron beams as the display is scanned. CRTs are a proven, reliable, and inexpensive technology, and they present a clear image over a wide range of viewing angles.
However, their large size, the use of lead in their construction, their high energy usage, and concern over X-ray and electromagnetic radiation has caused many people to consider alternatives.
LCDs use light-gates made out of tiny liquid cells adjacent to a polarizing filter. By applying an electric current to the liquid, it can be polarized, allowing more or less light to flow through the light gate. Each pixel is made up of three liquid crystal cells, each with a colored filter—one each for red, green, and blue. LCDs use less power and space than CRTs, but have a narrower range of acceptable viewing angles, may wash out in bright light, and typically have a less durable front surface than CRTs.
Some graphic artists prefer CRTs, claiming that they reproduce a wider range of colors with greater accuracy.
To display images of different resolutions on a CRT, the width of the electron beams is changed, making the pixels larger or smaller. This results in an undesirable blurring, softening, or blocky presentation of the image, so it is always best to run an LCD at its native resolution.
Other flat-panel technologies available include:. They are currently used on some cell phones and portable music players and hold promise for large, inexpensive display panels once manufacturing issues are refined.
These use thousands of tiny cells that can be placed in a particular color state and then stay in that state until changed. There are several different approaches to cell construction, but all electronic paper displays are reflective and use ambient light to illuminate the display.
This results in a familiar experience for the user and offers very low power consumption for displays that rarely change. Electronic paper displays are used on some cell phones and e-book readers, and may eventually be used for certain types of monitors, signs, and even billboards.
A video projector can also be considered a type of monitor. This is coupled with a high-power light, projection lenses, a cooling system, and control electronics. The control electronics in video projectors are usually more sophisticated than the circuits found in CRT or LCD monitors:. Images can be flipped left to right for rear-projection applications or top to bottom for upside-down ceiling mounts. Keystone correction permits the sides of the image to be slanted and the top of the image to be made smaller than the bottom, or vice versa so that the image will appear rectangular when projected onto the screen at an angle.
Image scaling and multiple video inputs enable a clear picture to be projected despite huge variations in the resolution, quality, and speed of the incoming signals. When dealing with video signals, timing is everything. In order to display a stable picture and accurately locate each dot during the scanning process, the timing of the video signal must be very precise.
The speed of the video signal is dictated by the screen resolution and refresh scan rate. Resolution is defined in terms of horizontal and vertical pixels; scan rate is expressed in Hertz Hz , or cycles per second.
A scan rate of 70 Hz or higher is recommended for CRTs in order to reduce eyestrain for the user; the refresh rate is not as important for most LCD displays, because the decay time the time it takes a pixel to change color is longer. The length of cable that may be used to connect a video monitor to a video card is directly limited by the scan rate.
The longer the cable, or the poorer the insulator, the more energy is stored. This restricts the maximum refresh rate that can be used without noticeable image degradation. Monitors connect to a video card using one of these standard connection schemes:. All of the color, luminosity brightness , and synchronization information is encoded into a single composite analog electrical signal.
An analog connection scheme that uses varying voltages on three separate pins to control the RGB levels. Additional pins are used for synchronization and device probing. A modern connector that supports analog signals, digital signals, or both. Where possible, though, the digital signal should be used for greater accuracy and clarity. DVI-D supports dual-channel connections for high-resolution displays above 1.
It is common on high-definition television equipment and monitors, but so far is not used often on computers. There are two connectors in use: Type A, which supports single-channel connections, and Type B, which has additional conductors to carry a dual-channel signal.
While HDMI was intended as a consumer specification for entertainment devices, DisplayPort initially targets computer systems. Offering support for color depths beyond 24 bits per pixel 16 million colors and the potential of an easy future upgrade to fiber optic connection, DisplayPort is a strong specification. But, it is late to market, and it may be difficult to unseat entrenched standards such as HDMI.
The circuitry that drives the monitor is contained on a video card or integrated into the system motherboard. There are four main components in a video card, as illustrated in Figure :.
An area of memory set aside to keep track of the image on the screen the framebuffer and other video-related data such as pixmaps, save-unders, and images that will be composed into the framebuffer by the GPU. The term platform can refer to any of several things, or to a combination thereof, depending on the situation: 1 the type of operating system e.
An important factor in X's hardware independence is the fact that it is compatible with most currently available video cards. A window system , also called a windowing system , is a collection of software that makes it easy to take full advantage of the window creation and other graphics capabilities of a computer.
It keeps track of all the application programs that are being used, the windows that are associated with them, and the status of input and output from those applications. A graphic engine is software that is used by application programs to draw images on computer display screens. Free software is software that is free both in a monetary sense and with regard to use.
That is, it can be obtained by anyone at no cost and can be used for any desired purposes, including studying, copying, installing on any number of computers, modifying, extending and redistributing.
One of the most outstanding examples, in addition to X, is Linux, which is the most rapidly growing operating system in terms of the number of installations.
A major feature of X is that it is separate from the operating system. This is in sharp contrast to the situation for many non-Unix-like operating systems including the Microsoft Windows systems and the Macintosh systems prior to OS X , for which the graphic engine is an integral part of the operating system. This separation means that if a GUI is not needed, then it is not necessary to install or run X. Thus, on computers and other systems for which GUIs are not required, such as those that are used solely as servers, it is possible and very easy to not install X, thereby eliminating the overhead i.
Also, consistent with its philosophy of mechanism, not policy , X does not specify or provide the user interface itself or any specification with regard to the the appearance of the interface, nor does it specify the behavior of application programs including communications between them or the functions of a window manager.
This likewise contrasts with many other operating systems. Rather, the interface is handled by separate programs, and thus the visual interface of X-based environments is extremely flexible and multiple interface styles can easily coexist on a single computer.
X is actually a standard i. X is a low-level method of creating windows, receiving user inputs key-presses and mouse events and drawing lines, curves and bitmaps i. The behavior of the application programs and the design and style of the user interface are left entirely up to those programs. However, all graphical display functions must adhere to the X standard if they are to work smoothly with Unix-like operating systems. The user does not interact directly with X. This is because X is merely an intermediate software layer that provides the basic graphic capabilities that make it possible for window managers and desktops to work.
That is, the windows and attractive backgrounds seen on the display screens of computers running Unix-like operating systems are not X, but rather they are a window manager or an integrated desktop.
X's lack of specification's regarding both the appearance of application programs and communication between such programs initially resulted in several very different interfaces and in application programs that frequently did not operate well together. However, this issue has been addressed with increasingly good results by integrated desktops, or desktop environments , which provide effective interface guidelines for obtaining both a consistency of the look and feel among applications and communication between them without sacrificing any of the ability of X to be configured by both users and programmers.
The great flexibility of X is in very large part a result of its independence from the operating system and its client-server structure. However, the client-server relationship in X is inverted from the way in which client-server relationships are usually visualized; that is, rather than multiple client machines accessing a single server, each local machine i. An X server is a program in X that runs on local machines and handles all access to the graphics cards, display screens and input devices typically a keyboard and mouse on those computers.
It does the actual work of performing the requested display operation. An X client is any application program. It displays on the X server but is otherwise independent of that server. It gains access to windowing services via the Xlib library i.
0コメント