Chapter B2. The X-Window Universe
 
Goals for this chapter: rpm packages covered in this chapter: 
  • XFree86 (X)
    • XFree86-doc
    • XFree86-3DLabs
    • XFree86-8514
    • XFree86-AGX
    • XFree86-FBDev
    • XFree86-I128
    • XFree86-Mach32
    • XFree86-Mach64
    • XFree86-Mach8
    • XFree86-Mono
    • XFree86-P9000
    • XFree86-S3
    • XFree86-S3V
    • XFree86-SVGA
    • XFree86-VGA16
    • XFree86-W32
  • XFree86-100dpi-fonts
    • XFree86-75dpi-fonts 
    • XFree86-cyrillic-fonts
    • XFree86-ISO8859-2
    • XFree86-ISO8859-2-100dpi-fonts
    • XFree86-ISO8859-2-75dpi-fonts
    • XFree86-ISO8859-2-Type1-fonts
    • XFree86-ISO8859-9-100dpi-fonts 
    • XFree86-ISO8859-9
    • XFree86-ISO8859-9-75dpi-fonts
  • rxvt (rxvt)
  • xosview (xosview)
  • xsysinfo (xsysinfo)
  • x3270 (x3270)
  • xcolorsel (xcolorsel)
  • xloadimage (xloadimage)
  • XFree86-Xnest
  • XFree86-Xvfb (X disk less = Xwindow)
  • XFree86-contrib (xcalc, ico, xev)
  • XFree86-devel (/usr/X11R6/include/X11/*, imake)
  • XFree-libs (/usr/X11R6/lib/libXt.so.6)
  • XFree86-xfs
  • XFree86-XF86Setup (XF86Setup)
  • Xaw3d
    • Xaw3d-devel
  • AfterStep (afterstep)
    • AfterStep (afterstep)
  • fvwm (fvwm)
  • fvwm2 (fvwm)
    • fvwm2-icons
  • kterm (kterm)
  • wmconfig (wmconfig)
  • xlockmore (xlock)
  • xscreensaver (xscreensaver)
  • xtoolwait (xtoolwait)
  • Xconfigurator
 

 

A Historical Introduction.

X-Window is a window system that is independent from the running operating systems. In truth, the X of the name X-Window comes from UNIX but X-Window also works on OS/2, Apple MAC and other OS.

X was developed from a cooperation between the MIT  Massachusetts Institute of Technology and Digital Equipment Corporation, under the "Athena" project, in 1985, by Robert Scheifler and his staff. The original software, whose name was "W", was developed by Paul Asente at Stanford University.

How was the idea born?  The idea was born from the monitors that the MIT received every year as a donation from all over the country. All these hundreds of monitors from different vendors remained unused at MIT. The question was: "Is there some way to use all these monitors for an operating system?" In this way X was developed.

Today it is possible to use X from one workstation to display the same application on 8 different monitors, or to send an application from Palo Alto to Boston using TCP/IP and the Internet.

The first versions were used exclusively at MIT and DIGITAL, but starting from version X 10.3 several UNIX vendors gave their approval to X. Later in 1988 the MIT Consortium was born, with IBM, HP, SUN, DIGITAL and SGI, to support X11 R3 on their hardware as the standard graphical choice. At a later date, SCO and other software houses joined the consortium. In 1984 the MIT Consortium become the X/Open Company. The Open-Group, was formed in 1996 by the consolidation of the X/Open Company (founded in 1994) and the Open Software foundation (OSF, founded in 1988). It is an international consortium of more than sixty (60) vendors and end-users from industry, government and academia. The "X Foundation" become X.org, continues to belong to the OpenGroup

Today X is available for VAX/VMS from DIGITAL and from all the UNIX hardware platforms: HP, IBM, Silicon Graphics, SUN and others, while for the PC it is available on SCO, Solaris, Linux: Caldera OpenLinux, RedHat, SUSE and others. As we explained before, X runs also on MAC and OS/2.

One of the main differences between X and other graphical window systems is that X doesn't support a fixed graphical style. Some graphical systems, like MAC from Apple or Microsoft Windows, supports a single fixed proprietary Graphical User Interface; instead, on X it is possible to change to a new interface by changing the Window Manager. This offers flexibility and freedom in the use of the system.

Today it is possible, (we will show how later), to switch from a standard graphical interface like twm (Tab Windows Manager) or fvwm (Free Virtual Windows Manager), already included in the standard commercial distributions, to an interface like fvwm95 (a fvwm version, very similar to the proprietary Windows 95 from Microsoft Corporation), and from there to mlvwm, similar to Apple Mac, and then to olwm, OpenLook, from SUN, and from there to AfterStep, a NeXT-likegraphical interface, and then onwards to very light Windows Managers, like wm2 or enlightenment, a very beautiful Windows Manager. In other words, with X it is possible to choose the interface to work in; it can be changed quickly without any effort, free of charge. In this way you can have several graphical interfaces on the same machine, where the important aspects reside in the operating system and the back end (database), while the front end remains free.
 

A Short Story of X
 

1984 - Version X6 First window system called X
1985 - Version X6 First real X, used synchronous remote procedure calls and had a built in window manager.
1985 - Versions X7-X9 Improvements to X.6
1986 - Version X10.3 Introduced asynchronous protocol and WM clients. It was highly modular. Porting to several operating systems. First public demostration of X.
1987 -Versions X11R1 Major revision of the protocol made modeless
1988 - Jan. MIT Consortium foundation
1988 - Mar - X11 R2 First implementation of Xt.
1988 - Apr.  SUN announces OpenLook interface
1988 - May. Open software Foundation.
1988 - Nov. X11 R3 Stable development system for X, on multiple platforms
1989 -  Motif Release 1.0.
1990 - X11 R4 Minor changes, best performance
1994 - X11 R5 X11 R5
1995  XFree86Project Inc is founded
1996 The OpenGroup Inc is founded to support the X-Window System development.
1996 Matthias Ettrich starts the KDE project
1997 X11 R6.3
1998 X11 R6.4
October 1998 Caldera releases OpenLinux 1.3 with KDE 1.0
October 1998 Added Harmony to our software page. Harmony is a FreeQT library. 
December - 1998 RedHat starts to develop GNOME: GNU Object Model Enviroment.
March 3 1999 GNOME 1.0
March - 1999 KDE reaches v1.1, emulating MS-Windows, MAC OS and BeOS.
April - 1999 Qt become free with the QPL license.
April - 1999 Caldera release OpenLinux 2.2, with KDE 1.1, offering the first Linux for desktop
May - 1999 RedHat will include KDE, in its new release 6.0, with GNOME.
May - 1999 SuSE includes KDE 1.1, with KOffice beta
May - 1999 KDE touchs v 1.1.1
Aug - 1999 KDE release KDE 2.0 pre-alpha
Sep - 1999 K DESKTOP ENVIRONMENT 1.1.2 SHIPS
May 15 2001 Motif become open - Initial version is 2.1.30
Aug 16 2000 Sun and HP choose GNOME
Aug 14 2000 Miguel de Icaza found GNOME Foundation
Sep 04 2000 Qt now is under GPL 
Oct 23 2000 KDE Team release KDE 2.0 (Kopernicus) Final
Oct 23 2000 Future Technologies release FTKDE beta1
Nov 13 2000 KDE founds KDE League
Jan  18 2001 Xiimian - Formerly Helix Code - Secures $15 Million in Funding 
Jan 26 2001 Future Technologies Inc joins to KDE League
Feb 2 2001 KDE League (17 members) surpass GNOME Foundation members
Jan 28 2002 OpenMotif 2.2 now available

The Client-Server Model

The X System Architecture is based on the Client-Server model. A single process, called server, controls all the hardware I/O devices. The server manages the windows on the display, produces texts and graphics to control the events from the keyboard and mouse. The server provides a good interface for the graphics hardware, the display hardware (X-Terminals, PC, Workstations) and the X clients.
The Graphical X-Window Client-Server Architecture allows us to send applications not only to remote workstations but also to remote displays.

There are four machines on this network:

Three of these machines have a graphics display on them: There are five servers running on this network:

world:0   sky:0  sky:1  sky:2   heaven:0

Clients (including Windows Managers that can be different) run on any machine and can use any server.

Suppose, for example, that world's users wants to send her program contab to display number 1 of sky's machine. The customer will run the command:

contab -display sky:0.1

If, instead, she wants to send the program to display zero, she changes the command to 0.0 instead of 0.1.

It is important to be said that remote machines must authorize the reception of the applications. In other words, Jim must allow remote clients to send their applications to his machine.

The following command

[root@sky /root]# xhost +
access control disabled, clients can connect from any host
[root@sky /root]#

lets you receive clients from any remote host. The command "xhost -" closes the access to all hosts and activates the access only to the hosts listed in the ".Xauthority" file.

It is possible to allow the access to a specific host:

[root@sky /root]# xhost +heaven
heaven being added to access control list
[root@sky /root]#
 

Sending and Reception of X applications are managed by the X protocol and the program xauth authorizes the access to a remote display.

X allows you to use, like the user Heaven, different monitors (eight for example) from one server. In any case the server is always the same heaven:0.0.

Through the X Architecture it is possible to send an application from New York and visualize it on a display in Los Angeles using the TCP/IP protocol, through the Internet, and a high speed line.
 

Some X applications

The graphical X-Window System, developed in 1984, includes some programs and generally twm, the standard Window Manager. Linux includes twm, fvwm (Free Virtual Windows Manager), very similar to Windows 95, Afterstep, (NeXTStep-like), OpenLook in two versions (olwm) and (ovlwm). Since version 1.3, OpenLinux has included the kde and the kwm, a very beautiful and friendly user Graphical User Interface, very similar to the CDE (Common Desktop Environment) and Windows 95.
We will show you all these graphical user interfaces.

Now we will show how to run X applications:

We will run, for example, "xclock".

We will run "xclock" with some parameter: "xclock -digital"

To find out all the parameters or options it is necessary to use the "help" parameter, for example "xclock --help", or "-help"

For example, for xterm the parameter is "-help", precisely:

[root@world X11]# xterm -help
usage:
       xterm [-options ...] [-e command args]

where options include:
    -help                        print out this message
    -display displayname         X server to contact
    -geometry geom               size (in characters) and position
    -/+rv                       turn on/off reverse video
    -bg color                    background color
    -fg color                    foreground color
    -bd color                    border color
    -bw number                   border width in pixels
    -fn fontname                 normal text font
    -iconic                      start iconic
    -name string                 client instance, icon, and title strings
    -title string                title string
    -xrm resourcestring          additional resource specifications
    -/+132                       turn on/off column switch inhibiting
    -/+ah                        turn on/off always highlight
    -b number                    internal border in pixels
    -/+cb                        turn on/off cut-to-beginning-of-line inhibit
    -cc classrange               specify additional character classes
    -/+cn                        turn on/off cut newline inhibit
    -cr color                    text cursor color
    -/+cu                        turn on/off curses emulation
    -fb fontname                 bold text font
    -/+im                        use insert mode for TERMCAP
    -/+j                         turn on/off jump scroll
    -/+l                         turn on/off logging (not supported)
    -lf filename                 logging filename (not supported)
    -/+ls                        turn on/off login shell
    -/+mb                        turn on/off margin bell
    -mc milliseconds             multiclick time in milliseconds
    -ms color                    pointer color
    -nb number                   margin bell in characters from right end
    -/+aw                        turn on/off auto wraparound
    -/+rw                        turn on/off reverse wraparound
    -/+s                         turn on/off multiscroll
    -/+sb                        turn on/off scrollbar
    -/+sf                        turn on/off Sun Function Key escape codes
    -/+si                        turn on/off scroll-on-tty-output inhibit
    -/+sk                        turn on/off scroll-on-keypress
    -sl number                   number of scrolled lines to save
    -/+t                         turn on/off Tek emulation window
    -tm string                  terminal mode keywords and characters
    -tn name                     TERM environment variable name
    -/+ut                        turn on/off utmp inhibit
    -/+vb                        turn on/off visual bell
    -/+wf                        turn on/off wait for map before command exec
    -e command args ...          command to execute
    %geom                        Tek window geometry
    #geom                        icon window geometry
    -T string                    title name for window
    -n string                    icon name for window
    -C                           intercept console messages
    -Sxxd                        slave mode on "ttyxx", file descriptor "d"

Fonts must be fixed width and, if both normal and bold are specified, must
have the same size.  If only a normal font is specified, it will be used for
both normal and bold text (by doing overstriking).  The -e option, if given,
must be appear at the end of the command line, otherwise the user's default
shell will be started.  Options that start with a plus sign (+) restore the
default.

[root@world X11]#
 

Applications like Netscape Communicator, StarOffice, grok, plan, and others are X applications. Therefore these and their respective options are resources.

For example, Netscape Communicator has the following options:

[root@world X11]# netscape --help
Netscape 4.04/Export, 06-Nov-97; (c) 1995-1997 Netscape Communications Corp.
usage: netscape-statMotif [ options ... ]
       where options include:

       -help                     to show this message.
       -version                  to show the version number and build date.
       -display <dpy>            to specify the X server to use.
       -geometry =WxH+X+Y        to position and size the window.
       -visual <id-or-number>    to use a specific server visual.
       -install                  to install a private colormap.
       -no-install               to use the default colormap.
       -ncols <N>                when not using -install, set the maximum
                                 number of colors to allocate for images.
       -mono                     to force 1-bit-deep image display.
       -iconic                   to start up iconified.
       -xrm <resource-spec>      to set a specific X resource.

       -remote <remote-command>  to execute a command in an already-running
                                 Netscape process.  For more info, see
                                 http://home.netscape.com/newsref/std/x-remote.html
       -id <window-id>           the id of an X window to which the -remote
                                 commands should be sent; if unspecified,
                                 the first window found will be used.
       -raise                    whether following -remote commands should
                                 cause the window to raise itself to the top
                                 (this is the default.)
       -noraise                  the opposite of -raise: following -remote
                                 commands will not auto-raise the window.

       -nethelp                  Show nethelp.  Requires nethelp: URL.

       -dont-force-window-stacking  Ignore the alwaysraised, alwayslowered
                                    and z-lock JavaScript window.open()
                                    attributes.

       -no-about-splash          Bypass the startup license page.
       -no-session-management
       -session-management       Netscape supports session management
                                 by default.  Use these flags to force
                                 it on/off.

       -no-irix-session-management
       -irix-session-management  Different platforms deal with session
                                 management in fundamentally different
                                 ways.  Use these flags if you experience
                                 session management problems.

                                 IRIX session management is on by default
                                 only on SGI systems.  It is also available
                                 on other platforms and might work with
                                 session managers other than the IRIX
                                 desktop.

       -dont-save-geometry-prefs Don't save window geometry for session.

       -ignore-geometry-prefs    Ignore saved window geometry for session.

       -component-bar            Show only the Component Bar.

       -composer                 Open all command line URLs in Composer.
       -edit                     Same as -composer.

       -messenger                Show Messenger Mailbox (INBOX).
       -mail                     Same as -messenger.

       -discussions              Show Collabra Discussions.
       -news                     Same as -discussions.

       Arguments which are not switches are interpreted as either files or
       URLs to be loaded.
 

The X applications must run in the background, in other words they must have their "own life", independent from the terminal or the graphical environment where they run.

To run an application in the background it is necessary to add the character "&" at the end of the command.

Therefore the X applications must run in this way: "Xapplication -option -resource &".

All X clients support the geometry resource; this means that it is possible to run the application with a specific geometry,  (height, width and the x,y position on the screen). The origin is at the center of the top left pixel inside the border.

We demonstrate with xterm. Run "xterm -geometry 80x43 &" so the specified window with dimensions 80x43 pixels will appear.

Some resources can also be changed when the application is running, other times from an external file.

Suppose that you run xterm and now you want to add the scroll bar.

To do this you need to:

In the same way you can change the xterm font and other resources. To browse all the possibilities just press "Ctrl+(left mouse button, right mouse button, both mouse buttons").

All these explanations will be included in the X Window: Use & Programming course.

The resources of X applications: Xt-Intrinsic

One of the better features of X-Window is the possibility to change the resources of an application from an external file or at run time. In other words, it is possible to change the color of "xclock", enable the xterm scroll bars, to run or to change the label of a button in xcalculator from the command line or to modify the corresponding resource file. The applications load these resource files at run time. These files are present in the directory: "/usr/X11/lib/app-defaults".

In other words, each time you run an X application, it loads the resource file after checking for a local user resource file ".Xresources" (ex ".Xdefaults" ) and changes the corresponding resource.


Press the button to go to the next section.