Introduction


X Window, or more exactly, the X Window System, is the graphical system developed at M.I.T. in 1985 to use all the monitors that the Insitute had received as donations from different places throughout the world. from different places in the world. The X in X-Window refers to UNIX, because this system was developed for Unix vendors: Digital at first, and later HP, IBM and SUN Microsystems.

The entire project is a masterpiece of software engineering for its precision of development, performance when running, its power to manage the network protocols: TCP/IP, DECNet or UDS, its support various monitors from a single station, its ability to modify the application resources like color, fonts and strings to run commands without modifying the source, neither recompile, or recompiling the source. This is done by taking advtange of the Xt-Intrinsic toolkit, and other exclusive, powerful features that are available in an open arena like X Window, which offers its source free to everyone.

Using X Window is very similar to using other graphical interfaces like MS-Windows, Macintosh, or OS/2. There is a monitor, (in X, you can have up to eight different monitors from different vendors at different resolutions), there is a mouse or a graphical input device, and the keyboard that is designed for the local country.

Through X, we can have the same resolution or higher than on MS-Windows, but with a more power and flexibility though the "Root Menu", which is the menu available on the background of the graphical environment. From the root menu we can run other X applications like "xcalc" (the calculator), "xman" (the on-line manual), and many others.

X-Window also allows you to send X applications between the various "client" machines, because it acts as a server. So, if the machine named "world" is running X Window, it can send applications to all the other machines on the network though client-server techniques. With X, we can choose which monitor, we want to send the data to on the remote machine. For example, "sky:2" will be the third monitor on the "sky" machine.
 
 







Programming on X-Window is easier than on other graphical interfaces. All the graphical interfaces, MS-Windows, Macintosh, and X-Window, require that the "graphical" programs wait for input from the keyboard, from the mouse, from the environment or from other applications. These inputs are called "events". In the X system, the functions to manage these events are included in the library "libX11.a", while the functions to manage the resources, and the X toolkit XtIntrinsic, are included in the library "libXt.a".

The architecture of an X program is based on different programming blocks. Each block represents one step in the knowledge necessary to create an X Window Program. The first step is C programming under UNIX, more complete than C programming under MS-Windows. The second step is learning to use resources, which determine a program's default behavior, and how to change resources at runtime. This step involves learning about the Xt-Intrinsic library.

The third and final step is learning about the "Widget Set". Under X, a Widget is a graphic element. For example, a Menu is a Widget. Scroll bars, text fields, labels, etc. are also widgets. There are various widget sets available under X, developed over the past several years. The most common are the Athena Widgets, the DECWindows, and Motif Widget sets. This last was standardized in the 90's, based on AT&ampT's Open Look. It later became the Open Group's choice for the standard in the Common Desktop Environment (CDE). Today it has achieved popularity in its "freeware" version: KDE.

This is the "Periodic" table for the OSF/Motif Widget Set:
 
 





In the past, it was necessary to develop "by hand"; writing the source and the Makefile, and running the cycle "develop-test-correct-develop-test...". Only after a few days or weeks would you see the first dialog windows appear in your application. To make this hard work easier, the Open Group has, over the past few years, offered development environments like "dtbuilder", which is included in the maXimum CDE Developer Edition. dtbuilder allows you to create X applications in seconds with simple "drag-and-drop" techniques. dtbuilder was developed by IBM, HP, Digital, and Sun, and ported to Linux by Xi Graphics.

This is a classical view of "dtbuilder".





There are thousands of programs, "clients" (or X applications), together with the window manager and the utility programs like "bitmap", "xcolorsel" and many others. The interest of users and enthusisasts in both freeware and commercial ports to X increases every day. This is a list of classical X files:
 
 





The X Window System is so flexible that it offers the possibility of developing a windows manager which, for example, is identical to the Macintosh/OS interface. Under Linux, this is "mlvwm", developed by a student in Japan.

So, all the graphical applications under X that run with this window manager will have a look-and-feel similar to the Macintosh. (However, there are other emulators like Executor, that let you run Macintosh programs under Linux, and so re-create the entire environment!).

We conclude this introduction before starting the course: X-Window: Use and Programming, by discussing the current X-Window situation. Thanks to Linux, now available for the most important platforms like Intel and clones, Power Macintosh, Alpha, Sparc, and also VAX, PalmPilot, Nintendo and others, there is an X implementation on each of these platforms.

The KDE has become a standard GUI. As of the February 1999 release, it is at version 1.1. The KDE interface includes all the necessary elements and the functionality necessary for easy use of the Linux system, not only on Intel platforms, but also on Alpha or Power PC.

X Window and its various programming systems let you build applications in Java, and also in Tcl/Tk; these can run on MS-Windows, Linux and Macintosh. This is an example of the same source that runs on both worlds. This is the Windows screen.

And this is the Linux screen, with the KDE!






Notice that they look very similar, with one big exception -- the second one is free!

The X Window System, thanks to Linux, offers us a future that is very interesting and better than the current situation. Every day, it offers us lower costs with programs of ever higher quality. All the development systems that will be explained in this course, starting with C, through Tcl/Tk, up to Java, as well as builders like "dtbuilder", SpecTcl, or KDeveloper, offer "the" alternative to other systems that are currently on the market.

X Window is the graphic interface to UNIX systems. It has always been freeware, and now is on the excellent Linux freeware operating system.

Let's step on the gas and get started with X Window.