Learning the Unix Operating System

Learning the Unix Operating SystemSearch this book
Previous: 2.4 Working with a MouseChapter 2
Using Window Systems
Next: 2.6 Other X Clients
 

2.5 Working with Windows

A window manager program helps you control windows. This section explains how mwm manages windows. Other window managers do the same kinds of things - but with some variation. Let's start by looking at Figure 2.4, a typical window under mwm.

The top part of every window has a titlebar with the title of the window and three buttons. The edges of the window can be used to resize the window. (See the Note in "Resizing Windows," later in this chapter.)

2.5.1 Using the Titlebar

The top part of a window has three buttons (see Figure 2.4).

The two buttons at the top right corner have boxes inside them. Clicking the button with the small box makes the window as small as possible; the window turns into an icon. "Iconifying" puts unneeded windows out of the way without quitting the program inside them; it also keeps you from accidentally typing into a window. (Figure 2.1 shows an icon.) The button with the big square maximizes a window. That makes it as big as the client will allow, often as big as the screen.

Figure 2.4: A window running with the Motif Window Manager

Figure 2.4

The left button opens the window menu; this is explained in "The Window Menu" section later in this chapter.

2.5.2 Moving Windows and Icons

To move a window, start by pointing to the titlebar. To move an icon, point to it. Hold down the first mouse button and drag to the new location - then let go of the button. You can also start the move from the window menu (see the following section on the window menu), but we think this way is easier.

2.5.3 Resizing Windows

If you have the pointer inside a window and then move the pointer to an edge, the pointer will change to an arrow shape. The arrow points the direction that you can resize the window. If you pointed to one of the corners, you can resize both sides that meet at the corner. To resize when you have the arrow pointer, press and hold the first button, then drag the window border until the window size is what you want and release the button. If you don't get quite the size you want, just do it again.

NOTE: On some versions of UNIX and with some programs, changing the size of an xterm window may confuse programs currently running in that window. Also, remember that many UNIX terminals are 80 characters wide; if you're editing text in a window and change its width to something other than 80 characters, that can cause trouble later when the file is viewed on a standard 80-character-wide terminal.

2.5.4 The Window Menu

Under mwm, each window can be controlled by its own window menu. There are lots of ways to get a window menu. Here are two: click on the menu button at the top left corner of a frame (Figure 2.4), or click on an icon. Figure 2.5 shows a window menu. When the menu pops up, you can point to one of the items and click it:

Figure 2.5: The mwm window menu

Figure 2.5

On the menu, a keyboard shortcut follows each command. You don't have to use the mouse to choose commands. For example, to Minimize (iconify) a window, hold down the [ALT] (or [META] key and press the [F9] key. The shortcut for bringing up the window menu (and taking it away) is to hold the [SHIFT] key and press the [ESC] (ESCAPE) key. If your keyboard doesn't have all of those keys, the menu can be customized to use different keys. O'Reilly & Associates' X Window System User's Guide, Volume 3M, explains how.

2.5.4.1 Exercise

Copy and paste part of a command line.

Type who am i;date and press [RETURN] in one xterm window. Highlight the who am i, set focus to the other xterm window, and copy the command there.

Move a window.

Grab and drag the window by its titlebar.

Iconify a window from the titlebar.

Use the Mimimize button.

Restore the icon.

Select Restore from the window menu.


Previous: 2.4 Working with a MouseLearning the Unix Operating SystemNext: 2.6 Other X Clients
2.4 Working with a MouseBook Index2.6 Other X Clients

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System