X Basics

X Basics

As you can see, the X-model revolves around the familiar client “server arrangement. The X-application is the client and generally runs on a box considered a "server" for all other purposes. The X-application controls only the "client area" of the window. The window frame, controls, resize handles, and so forth are all actually drawn and maintained by the window manager program. Thus, three applications ”the X-server, the X-application (or client), and the window manager ”are involved in presenting an application. The X-server resides on the box the user is sitting at. Beyond that, all bets are off. The window manager may be running on the same box as the X-server, on the same box as the application, or on a totally different box. The application may be running on the same box as the X-server, on the same machine as window manager, or on a totally different box. That's the beauty of X: It literally doesn't matter where you are in relation to the running program. You get what you want where you want it.

X-programs use a "display" specification (which may be set by the DISPLAY environment variable or may be specified as a command line argument using the -display switch) to determine where the X-server is. The format of a display specification is:

address:device number.display number

The address is the host address of the box on which the desired X-server is running. The device number refers to which display controller on that host is to be used (X supports multiple display cards). The display number refers to which monitor (sometimes called a head ) attached to that display device is to be used (X supports multihead displays, which are cards that can drive multiple monitors ). X-servers start sockets listening on port 6000 + device. In other words, if you have an X-server handling display device 1, it is listening on tcp port 6001.

On most PC hardware, there is only one display device, and that device has only one monitor, so the numeric portion of most display specifications is ":0.0". When the X-server is on the same host as the application, you may leave the address portion empty, thus ":0.0" would be the entire display specifcation.

If we consider the case in Figure 2-1 , the display specification for the window manager is ":0.0" because it is on the same box as the X-server. The "xcpuinfo" program, however, has "flour.kitchen.org:0.0" as its display specification because it is being displayed on the host "flour," but it is being run on the host "soda."

The flexibility X- windows offers by assuming that the elements of the user interface are distributable over a network makes X- windows running on Unix platforms (and, thus, a Unix-like platform such as Linux) one of the most powerful and flexible environments in all of computing. Why? Because by virtue of this design element of X, combined with the full integration of TCP/IP networking into the operating system, we have a software environment where your geographical location has absolutely nothing to do with your ability to use a given computing resource.

In other words, if you are traveling in Hong Kong and get a call saying "We can't figure out why the check printing system is cutting hundreds of ten-thousand-dollar checks, all made out to you! Can you take a look at the production box?" all you need is a computer with an X-server and an Internet connection and you are as able to work with the "production box" as if you were right there. That's X, and it is a wonderful thing.

But what if you don't have an X-windows server available to you? Or what if the X-server you have access to is a few versions behind and you just can't run the applications you need ”like maybe being stuck on OS/2? Trying to run the GIMP? Watching your desktop crash?

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net