Using XWindows on the IBM RS/6000
UNDER CONSTRUCTION 7/20

Using XWindows on the IBM RS/6000

The X Window System is a group of programs that let you divide your workstation's screen into one or more overlapping rectangular windows. You enter information into a window by moving a mouse pointer into that window and typing on the keyboard. Each window acts like a separate terminal, and you can do different things in each one. You can write a paper in one window, compile a program in another, view your mail messages in still another, and so on.

X makes the workstation a very powerful instrument. After you create the windows you want to use, you can move them around, shuffle them above or beneath one another, and make them any size you want. And you can remove individual windows from your screen at your pleasure. You manipulate windows using either the mouse or certain keyboard combinations or both.

Mice and Windows

The mouse is the small puck with some buttons on it that is attached to your workstation. The mouse controls the mouse cursor on your screen.

When the mouse cursor is inside most windows, it looks like a capital I or an arrow, and when it is over the background screen (the area outside every window), it looks like a capital X. When the mouse cursor is inside a window, that window is called the active window. Whatever you type at the keyboard appears in the active window. When the mouse cursor is over the background screen (also called the root window), typing at the keyboard has no effect.

There are three actions you can perform with the mouse: pointing, clicking, and dragging. Pointing is simply moving the mouse to put the mouse cursor in the right place. Clicking is quickly pressing and immediately releasing a mouse button. Dragging is holding down a mouse button, moving the mouse, and then releasing the mouse button.

Creating Windows with xterm

The xterm program lets you create an additional window on your screen into which you can type commands and receive information.

To create a new window, just type:

xterm &

Unix returns:

[1] 33656

Don't forget to type the & after xterm. Using the & causes the xterm program to run in parallel with the first window as a concurrent process. If you don't type the &, you won't be able to work in your original window, since you will be running xterm from it. The [1] means that this is your first background process and the 33656 is its Process Identification number, or PID.

After you type xterm &, the mouse cursor will change into a bracket with a `rubber band' window next to it. Also, in the center of the screen, a small box will appear that contains the dimensions of the window and its coordinate location on the screen. Now move the bracket (by moving the mouse) to the location on the screen where you want the upper left-hand corner of the window to be. Then click the left mouse button or press Return/Enter and a window that is 80 columns wide and 24 lines high will appear on your screen.

After you have created a window, wait a few seconds for the prompt to appear, and you'll have another window to work in.

Another way to open a new window is through the menu.

Getting Rid of a Window

You can get rid of a xterm window by typing exit and pressing Return/Enter in it. This kills the xterm process and makes the window vanish.

It is a good idea to clear all the windows that you have created before you logout, though not absolutely necessary. You should logout by pressing the LOGOUT button in the upper right corner.

Xterm windows have many features that you can customize (i.e. size, position, and font type of your windows). Type man xterm at the prompt.

Logging On

Some of the terminals in GDAL offer you a choice of server. If the screen you see has a menu, move the mouse pointer to the site you wish to logon to, and double-click.

You will then be asked for your name and password; move the cursor to the name box and enter the requested information.

If your login succeeds, the Motif window manager will be loaded, and you will be presented with a number of windows:

The Command Menu

By moving the mouse pointer into the background area and pressing and holding the left mouse button, you can bring up the command menu. While still holding the button down and moving the mouse pointer into the menu, you can highlight different options available in the menu. Select one by clicking on it.

	

Help!		Calls up SSC's Gopher, from which you
		can find help.

New Window      Allows you to open another aixterm
                window.  You can select the window by
		font size, background color, or 
		server.

Shuffle Up, 
Shuffle Down    Lets you raise and lower windows.

Refresh         Refreshes the screen.

News readers	Opens a Usenet news screen with either
		the tin newsreader
		or the rn newsreader.

Elm e-mail	Opens a screen for the ELM mailer, 
		which allows you to read and write 
		electronic mail.
					
Utility		The utility menu offers you the following:

		* xMosaic -- a World-Wide Web browser
		* xCalculator -- a desktop calculator
		* xGopher -- a Gopher browser
		* xArchie -- a file and FTP browser
		* xBiff -- the mailbox in the upper right that
			   alerts you when you have new mail

Editors		This menu offers you a choice of text editors.  
		When selected, a window will open with the text 
		editor inside.
		
		* Gnu Emacs
		* Micro Emacs
		* XEdit
		* Pico

SSDC Apps	This is one way to run these SSDC applications:

		* Sas
		* Stata
		* Gams
		* Limdep
		* Tsp

xGopher		Opens a Gopher browser to one of the following 
		servers:
		
		* Social Science Computing
		* University of Pennsylvania
		* School of Arts and Sciences
		* Population Studies
		* Library
		* ICPSR (Inter-University Consortium for 
		  Political and Social Research)

Restart...      Restarts the Motif Window Manager

Quit            Kills the Motif Window Manager
                (NOTE:  This DOES NOT exit XWindows.  
                See Exiting XWindows for more details.)

Manipulating Windows

To select a window for use, click on that window. It will then appear highlighted.

To change the size of a window, move the mouse pointer to one of the resize borders surrounding the window. (You should notice a change in the mouse pointer.) Press the left mouse button to "grab" the border, and while holding the button down, drag the border to the appropriate size. Releasing the mouse button will end the action.

To move a window, move the mouse pointer to the title bar at the top of the window. Press the left mouse button and drag the mouse cursor to where you want to place the window. A counter will appear in the center of the screen (this shows the position of the top left corner of the window), and an outline of the window will move as you move the mouse. Release the mouse button to finish the placement.

To access the window menu, click on the button directly to the left of the title bar. This button looks like a square with a horizontal bar in it. This menu will allow you to move the window, resize it, cycle it above or below other windows, or close it.

To make the window into an icon (minimize), click on the button directly to the right of the title bar. This button looks like a square with a small dot in it. To restore the window, you can double click on the icon.

To maximize the window, click on the button at the extreme right of the title bar. This button looks like a square with another smaller square sitting on top of it. When you click on this button, the window will expand to its maximum size, or, if it has already been maximized, contract to its original size.

Customizing XWindows Defaults

There are numerous convenience options that may be set for XWindows. These options are located in two files: .xinitrc and .mwmrc.

The .xinitrc file is read by xinit to initialize the user's display by setting up windows and running other programs when XWindows is initially called. If such a file is located in the user's home directory, xinit will use the settings found there. Otherwise, xinit uses the system default file, which is located in /usr/lpp/X11/defaults/xinitrc. To obtain a copy of this system file, enter the following command at the AIX prompt:

cp /usr/lpp/X11/defaults/xinitrc $HOME/.xinitrc

Modifications to this file should only be made near the end of the file and should come before the line containing exec mwm.

A third customization file is the .mwmrc file. This file is used to customize the user's menus. Like .xinitrc, xinit will use the system default (located in /usr/lib/X11/system.mwmrc) if this file does not exist in the user's home directory. To obtain a copy of this system file, enter the following command at the AIX prompt:

cp /usr/lib/X11/system.mwmrc $HOME/.mwmrc

Exiting XWindows

To exit XWindows, click on the LOGOUT button in the top right window. The screen will clear and the terminal will reset for a new login.
Thanks to elmyra.eng.ua.edu and darkstar.ucsc.edu for the main text of these documents.
Back to Help Menus Overview page