This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.

x system guide »

Contents

Introduction

A window system is a collection of programs which permit you to use and display many different applications on a single workstation screen. By dividing the screen up into several small, possibly overlapping sections called windows, you can have multiple remote login sessions, graphics display programs, figure drawing programs, mail reading programs, text previewers, and so on, all running at the same time.

Most window systems utilize an abstraction called the desktop metaphor. That is, the workstation screen is treated as if it were the top of a desk, and each program window as if it were a piece of paper. On a real desk, you can lay pieces of paper out next to each other, stack them on top of one another, move them around, fold them up, and so on. Similarly, a window system allows you to place windows on the screen next to each other or on top of one another. You can also move windows around, "fold" them up, throw them away, etc.

Definition of Terms

This section defines some of the terms we will be using throughout the rest of this document. Don't worry if you don't understand them now, you can refer back to this section when the terms are mentioned in the text.

  • Application --- Each program which you use as a tool in the window system is called an application. Some examples of applications (or application programs) are a mail reading program, a figure drawing program, and a text editor.

  • Cursor --- A cursor is a small object on the screen, usually a box or an underline, which indicates where the next character will go when you start typing. On a normal terminal, there is usually only one cursor. When using a window system however, there can be multiple cursors in multiple windows.

  • Display --- The screen of your workstation is called a display in window system terminology. Although it is possible for some workstations to have more than one display (for example one black-and-white and one color), we will only be discussing workstations with a single display in this document.

  • Icon --- An icon is a small, usually pictorial, representation of an application when it is not in use. For example, a picture of a mailbox might represent the mail reading application. Generally, you can choose your own icons for each application, so that the pictures mean something to you.

    To iconify an application means to make that application's window(s) go away, and to make its icon appear. This is also referred to as closing a window (or application). To deiconify an application means to make the application's window(s) reappear, and to make its icon go away. This is also referred to as opening a window (or application).

  • Mouse --- A mouse is a pointing device with buttons on it. By moving the mouse around and pressing the buttons, you can tell applications to do things such as display a list of choices, draw a line, copy text from one area to another, and so on.

    The mice on the workstations described in this document all have three buttons on them. Usually the buttons are called "left'', "middle'', and "right'', but sometimes they are numbered one, two, and three from left to right. On a two-button mouse, pressing both the left and right buttons at the same time usually performs the same function as pressing the middle button on a three-button mouse.

  • Mouse Cursor --- The mouse cursor is very similar to a regular cursor as defined previously. When the mouse is moved around, the mouse cursor moves around on the display to indicate where the mouse is pointing. Unlike regular cursors however, the mouse cursor often changes shape to provide information to the user. For example, the mouse cursor might look like an arrow when you should be pointing at something, like a paint brush when you are "painting'' a line, and so on.

  • Root Window --- The root window is used to represent the desktop and usually takes up the entire display. The root window is usually a solid background color, such as gray or black, and the application windows are another color, such as white or light gray. This allows the root window to function as a background for the other windows.

  • Window --- A window is a bounded area in which an application performs all its input and output. A single application may use any number of windows, although most only use one or two. Although some window systems allow windows to be any shape, the X11 window system requires all windows to be rectangular.

The X Window System

The window system used by the ICS Department is called the X Window System, Version 11, abbreviated as "X11''. This software is being developed by a group called the X Consortium, and runs on a wide variety of workstations from different vendors due to its hardware-independent design. We are currently using Release 5 of the software.

Most users of X11 in the ICS Department use Sun workstations. Others use dedicated X-terminals, or older workstations configured to run like dedicated X-terminals. You should find that most of the information presented here also applies to other systems that use X11.

The X Window System can be divided into three fairly distinct parts: the server, the clients, and the window manager. Each of these parts plays an important role, and you should be aware of what each part is used for, although you needn't understand the internal workings of any of the parts.

The Server

The X11 server is the program which is actually responsible for drawing on a workstation display. When it starts up, the X11 server creates the root window in the workstation display, and then waits for commands from application programs. Each application program sends commands to the X11 server such as "place a window here'', "draw a line from here to there'', "color this section blue'', and so on. When it receives these commands, the X11 server performs the appropriate operations for your workstation to make the display show the proper information.

The reason the X Window System places all responsibility for actually drawing on the display into the X11 server is to make writing application programs easier. Different manufacturers use different methods of controlling their displays. The commands to draw a line on a Sun workstation display will not work on an Apollo workstation display, and so on. By placing all the knowledge of how to actually draw on the display into the X11 server, application programs can send simple commands such as "draw a line'' to the server and don't have to worry about how the line actually gets drawn on each individual type of workstation.

NOTE: you should not confuse the term X11 server with the term file server, which describes something completely different. A file server is a computer that has disks from which other machines read data. The X11 server rarely runs on a file server; it usually runs on each individual workstation.

The Clients

Application programs, called X11 clients, are the heart of the X Window System, and the part with which you will have the most interaction. Each application program is called a client because it requests that actions be performed for it by the X11 server. There are three application programs which we will be discussing in this document. Many other applications are provided by the X Window System.

The Terminal Emulator

A terminal emulator is a program which acts as if it were a terminal by sending characters to and receiving characters from the computer. When the program receives special characters which would tell a real terminal to do things such as clear the screen or move the cursor, it translates these special characters into the commands to do this on your display. If you have ever used a program such as PCPursuit or Kermit on a home computer, you have used a terminal emulator.

The X11 terminal emulator is called xterm. It emulates a DEC VT-102 terminal, and can also act as a Tektronix 4014 graphics display. By default, xterm uses a window which contains 24 lines of 80 characters, the size of a real VT-102's screen. However, you can adjust this to whatever size you want by increasing or decreasing the number of lines and/or columns.

The Clock

One X11 clock program is called xclock, and does what you might expect -- shows a clock on the display. xclock will also display the day and date if the "-digital'' option is specified.

Another X11 clock program is dclock. This clock is make up of "LED'' segments, and also has the option of displaying the date.

The Mail Notifier

The mail notifier informs you when you have new mail. One X11 mail notifier is called xbiff. When you have no mail, xbiff shows a picture of an empty mailbox. When new mail arrives, xbiff beeps and raises the flag on the mailbox to show that you have new mail.

The Window Manager

By itself, an application program only knows how to create the windows that it is going to be using. It has no notion of where on the display other applications have placed their windows. Thus, when you start up several applications at once, they tend to put their windows on top of one another, obscuring the applications underneath them.

A program called a window manager solves this problem by allowing you to manage your desktop (display), letting you move your existing windows around, tell new application programs where to put their windows, and so on. The window manager also allows you to label your windows by placing title bars on them. For example, if you had several terminal emulators running, connected to several different computers, you might place a title bar on each window with the name of the computer it was connected to. Several other operations, such as iconifying and deiconifying applications, specifying what each mouse button does, indicating what icon to display for each application, and so on are also controlled by the window manager.

The window manager supported by ICS is called twm. There are other window managers available, such as uwm and olwm. They all allow you to perform much the same set of operations, but provide different user interfaces and enforce different rules about how the desktop is to be laid out. After you have learned to use twm, you may wish to experiment with some of the other available window managers. We do not recommend that you do this until after you are comfortable with twm, however.

Workstations

This chapter describes the system-specific aspects of the various workstations on which you might run X11. Although most other workstations will be similar, you should not assume that they are exactly the same.

Sun Workstations

Although there are many models of Sun workstations installed in the ICS Department, there are only three different styles of keyboards; Type 3, Type 4, and Type 5. Type 3 keyboards are usually found on 3/50 models; Type 4 and Type 5 are similar to each other and are usually attached to Sparcstaions.

A Type 3 Sun keyboard consists of three main sections: the left function keys, labeled "L1'' through "L10'', the main keypad which resembles that of a typewriter, and the right function keys, labeled "R1'' through "R15''. Type 4 and Type 5 keyboards also have left and right function keys. The left function keys are labeled "Stop,'' "Props,'' "Front,'' and so on; the right function keys are "Num Lock,'' "Home,'' "PgUp,'' etc.

Basically, the only section of the keyboard used by X11 is the main, typewriter-like keypad. It is possible to configure X11 to use the left and right function keys, but this is beyond the scope of an introductory document. There are three important keys on the Sun keyboard which will be used by X11:

  • CONTROL --- The CONTROL key is located on the fourth row of the keyboard, just to the left of the "A'' key. It allows you to send more character combinations to the computer. To use it, hold the CONTROL key down while pressing another key or a mouse button. Then release the key or button and release the CONTROL key.

  • META --- The META key is located on the bottom row of the keyboard just to the left of the space bar. It is used much like the CONTROL key to provide even more character combinations. NOTE: on Type 3 style keyboards, the META key is marked by the word LEFT. On Type 4 and Type 5 style keyboards, the META key is marked by a diamond.

  • SHIFT --- The SHIFT keys are located on the next-to-last row of the keyboard, next to the "Z'' key on the left and the "?'' key on the right. Please note that although the CAPS key will enable you to enter letters in upper case, this is not the same thing as pressing one of the SHIFT keys.

Using X11 in the ICS Environment

Before you can run X11 applications, you must first log in to your workstation.

Logging In

In order to log in, first find an unused workstation. If the display on the workstation is blank, try moving the mouse around or pressing the RETURN key once or twice. The display should come on (if it doesn't you should seek help from the consultant or lab attendant).

Normal Login Procedure

If you are using a Sun workstation, and a window with "Welcome to the X Window System'' is showing, start the login procedure by typing your login name and pressing [RETURN]. If you make a mistake and type the wrong letter, you can use the [DELETE] to erase it. After you enter your login name, the system will prompt you with "Password:'', to which you should enter your password and press [RETURN]. The system will not print your password. At your shell prompt, type xstart. xstart will copy the needed X11 files to your directory (if they don't already exist) and start up the X11 server.

Alternate Login Procedure

If your display contains one line of text with a machine name in it, look around on the display until you find a little black "X'' with a white border around it. This is the mouse cursor. Move the mouse around on your desk until the mouse cursor is inside the white box in the center of the display. You will also notice a thin vertical bar right next to the word "Login:''. This is a regular cursor, separate from the mouse cursor.

Once the mouse cursor is inside the white area on the display, type your login name and press RETURN. If you make a mistake and type the wrong letter, you can use the DELETE key to erase it. Notice that as you type, the regular cursor (the vertical bar) moves to show where the next character will be put. When the cursor is on the "Password:'' line, type your password (it will not be printed) followed by RETURN.

Whichever login procedure you use, after a minute or two your display should show a small window with the machine name and a clock. If it doesn't, contact the system staff for help.

Beginning with the upper left corner of the display and moving clockwise, the items you see are:

  • An xterm window which is connected to the CONSOLE device of your workstation. X11 uses the console device to log system messages and the like, and you will see them here. Generally, it is not advisable