Using X Windows
Getting the look and feel of X Windows
The look and feel of X-Windows is similar to Windows XP and other MS DOS based GUIs. The mouse may be used to navigate around the screen, point, and click on selections. The background window is called the root window; the mouse pointer is shaped like an arrow when it is over this window. Xterm windows are Linux CLI terminal emulators in which you may type commands. You will be using these to type commands and work with just about all the exercises in this chapter. The mouse pointer turns to a vertical bar similar to a text cursor. Other applications use other pointer shapes.
X uses all three mouse buttons - the left, middle, and right. If you press a button, the resulting action occurs in the window over which the mouse is hovering. Each X application may assign completely different and arbitrary actions and features to mouse buttons as there is general standard.
A terminal emulator (xterm) window allows users to interact with the underlying OS by typing commands at the prompt and pressing enter. The xterm utility may be used to create new windows. This is accomplished by issuing the 'xterm' command at the prompt. The klogin and ssh commands allow users to open a connection to a remote computer and interact with the remote computer through a CLI. Most window managers also allow users to start a new terminal emulator (a shell) by making a menu selection. (The default twm manager allows users to create xterm window though a corresponding option on the menu that appears when the user holds the left mouse button down over the root window)
The window manager allows users to manipulate the windows on the screen and control other aspects of the environment. A window manager should always be running in X Windows; moving from one window to another and positioning windows is very hard without a window manager. A window manager normally starts automatically with X windows. Many type of window managers including twm, olvwm, and fvwm are available for free download.

Screen Shot: X Windows using TWM
The twm window manager has three main menus that correspond to the main actions of the three mouse buttons. Pressing and holding the left mouse button over the root window displays the Applications menu. Pressing and holding the middle mouse button over the root window displays the Window Customization menu while pressing and holding the right mouse button over the root window displays the Environment menu. Options are selected by scrolling through the menus while still holding down the mouse button and releasing the button on the appropriate item. Submenus are indicated by boxes to the right of a menu selection. The pointer should be moved to the right until the submenu appears; submenu items may also be selected by mouse button release. Following are some pointers on accomplishing basic tasks using twm. All operations are performed with the mouse positioned over the root window (background).
Try the following to learn the basics of using the twm window manager:
| Action | Instructions |
| Redraw the screen | Press and hold the right mouse button to see the Environment menu, select 'Refresh screen' and release button |
| New xterm window | Press and hold the left mouse button, select xterm and release mouse button. |
| Move window | Position mouse over the title bar; press and hold the left mouse button; move to another part of the screen and release the mouse button |
| Resize window | Position mouse over the button located at the far right of the title bar, press and hold any mouse button. A small box with current window dimensions appears at the top left of the screen. Move pointer horizontally, vertically, or diagonally to increase or decrease width, length, or both. |
| Iconify window | Position mouse over the button to the left of the title; press and release any mouse button. The Window disappears and its icon (usually the title of the window) appears at the top left of the screens. |
| Restore Icon | Click on the icon |
| Maximize window | Position mouse over the button to the right of the title and press and release any mouse button Click on button again to restore the window. |
| Close window | Position mouse over the button at the far left of the title bar and press and hold any mouse button. Select Close Window in the popup menu and release the mouse button (select Force Quit if window does not close; you may loose data) |
Note: All the exercises in this tutorial may be performed at the prompt in an xterm window or the main Linux console before starting X Windows.