Using X Window

Last revision August 6, 2004

Table of Contents:
  1. What is a windowing system?
  2. The X Window system: definitions and concepts
  3. Server startup on Unix workstations
  4. Using an X terminal, PC or Macintosh as an X server
  5. XDMCP protocol for remote X servers
  6. Starting clients
  7. Authentication
  8. Window operations

Window operations

Window operations such as moving and resizing windows, bringing one to the foreground, etc., are not usually built in to the X server, but instead are controlled by a window manager program that you must run. This program is an X client like any other and does not have to run on the same computer as the X server.

Only one window manager program should ever be connected to a particular X server. Imagine the chaos if two different window manager programs are trying to manage the same display.

On Unix workstations, or X terminals connecting via XDMCP, a window manager is usually started for you automatically in the .xsession or equivalent startup file. The major Unix vendors are now standardizing on the "CDE" window manager to give a consistent "look and feel" that resembles Microsoft Windows.

For an X terminal or PC or Mac X server that is not connecting via XDMCP (running in rootless mode), there may be a built-in window manager, or you may want to start one on the remote Unix system. Use a remote command procedure, such as ssh or telnet, to access the remote Unix system and start the window manager just as if it were another X client program. Two standalone window managers that are usually available on Unix systems are mwm, which provides most of the functionality of the CDE window manager, and twm, which is a very simple window manager. Check their on-line manual entries for operational instructions.

Which window is active? Generally, all X clients can write output to their windows simultaneously. Data can be updated in all windows at once. Only one X client can be receiving input at a time, however, because there is only one keyboard and mouse. This is called the active window, or the window with input focus.

For the CDE window manager (or mwm or the older DECwindows manager), you must click the mouse with the cursor somewhere in a window to make it active. In many PC or Mac X server built-in window managers, such as eXodus, you also must click the mouse after moving its pointer to a window in order to make that window active. This is to make these programs compatible with standard PC or Mac windowing operation.

For the Unix twm window manager, the active window is the one where the mouse pointer is found. You do not need to click on the mouse in that window to make it active - just move the pointer there.

If the mouse pointer is not in any program window - but rather over some part of the screen background, which is called the root window, then holding down mouse buttons will generally bring up menus of window manager actions which allow you to do things like start or kill X clients, resize windows, etc.

The standard X mouse has three buttons, but unfortunately, there is no standard for what the buttons do. You must check the documentation for a specific window manager or X client to be sure. Generally, basic operations where a mouse click is needed, such as selecting an item from a menu, use the left button.

For a PC or Macintosh with a single button mouse, certain keys on the keyboard are generally taken over to provide the functions of the missing mouse buttons.

Some clients have their own menus, or respond to certain keys (such as q), or even have a command line (such as an xterm) which provide a method to kill or exit the client.

The window manager usually provides a function that allows you to kill any X client. For a PC or Mac, this may be a standard close box.

Finally, on Unix workstations, or remote servers connecting via XDMCP, if you exit the master console window, it usually kills all your X clients and exits the entire X environment back to a login prompt for the next user.

Similarly, on a PC or Mac with an X server, if you exit the X server program, it will generally kill all the clients that are connected to it.

However, somtimes cases occur on pangea where an X client that was started on pangea and pointed to a remote display did not die when the user logged off the remote system. It is best to explicitly kill all clients that have open windows on your display before logging off (or turning off) the display.

Comments or Questions?