• Aucun résultat trouvé

What to Expect When X Starts

Dans le document the X Window System (Page 67-71)

Whether you start the X Window System from the command line or

automatically from a login file, xllstart always executes the same sequence of steps.

1. If necessary, it adds the your system directory to your PATH variable.

2. It looks in your home directory for a .xllstart command file to read. If it doesn't find one, it reads sys. xllstart in your system directory instead.

3. It starts xini t, which starts the server and any clients specified in the .xllstart command file.

4. It looks in your home directory for a . Xdef aul ts configuration file to read.

If it doesn't find one, it reads sys .Xdefaults in your system directory instead.

5. It reads the configuration file named by the $ENVIRONMENT variable, . Xdef aul t s -hostname if the variable doesn't exist.

You won't notice any effect from issuing the command until the X display server starts.

The Server Creates the Root Window

When xllstart starts the server (the program that controls the operation of your keyboard, mouse, and display), your screen will turn gray. This means that the screen has now become the root window, the backdrop or "desktop"

on which the windows and icons of your environment appear. Although you can completely cover the root window with clients, you can never cover a client with the root window. The root window is always the backdrop of your window environment; nothing gets behind it.

In the center of the root window is an hourglass. This is the pointer and marks the current screen location of the mouse.

A Terminal Window Appears on the Root Window

A short time later the pointer changes to an X, and a terminal window appears at the top of your display (if you're using the default .x11start file). This window is under the control of a window manager. If you use the OSF /Motif Window Manager (mwm), your window has a three-dimensional frame. This frame contains window manager controls.

I

Figure 4-1. The Default X Environment: 'mwm' and One Window The window contains a command-line prompt and behaves exactly like the screen of a terminal. You can think of this window as "a terminal in a window." There are two terminal emulation clients: hpterm and xterm. The examples in this book use hpterm. Refer to the man page for your terminal emulator for specific details about it.

Move the mouse. The pointer moves on the screen. When the pointer is in the root window, it has an X shape. However, when you move the pointer to a terminal window, the pointer changes to an arrowhead (when on the window frame) or an I (when in the interior of the window).

4

With the OSF /Motif Window Manager, when you press and release button 1 while the pointer is in a terminal window, the window becomes the active window. When a window is active, its frame changes color. You'll discover that you can't type in a terminal window unless the window is active.

The active window is the terminal window where what you type on the keyboard appears. Your input always goes to the active window.

If there is no active window, what you type is lost.

The program running in the active window decides what to do with your typed input. Frequently the program will use a text cursor to show where your typed 4 input will be displayed.

What to Do If X11 Doesn't Start

Table 4·1. Possible X Window System Start Problems H this happens ... You should do this ...

The message command not found Check your spelling and reenter the start

appears. command.

The root window displays for a moment, Press the (Return) key to bring back your but then goes blank. original command-line prompt and see

below.

The root window displays, but no pointer Press (CTRL) ( Left Shift) (Reset) all at the appears. same time. «( Exit) ( Control ) ( Left Shift) for Domain/OS.) This brings your original command-line prompt back. See below.

The root window and pointer display, but Press and hold button 3. If a menu no terminal window appears. appears, open a window. Otherwise, press

( CTRL) (Shift) (Reset) «( Exit) ( Control)

(Left Shift) for Domain/OS.) Try restarting X, then see below if there's still a

problem.

The terminal window displays, but what Move the pointer into the window and you type doesn't appear after the click (press and release) button 1, then

window's command prompt. type.

If you encounter problems starting XII for the first time, check the following areas:

• Check the XII start log in your home directory for clues by typing more .xllstartlog (RetUm)

• Check that the correct directory is in your PATH statement. If you do not have an entry for the system directory, xllstart will add that entry to the path. You can be sure that the entry is always there by adding it to the path yourself. To check the PATH variable, type

en v [Return)

• Check that the DISPLAY environment variable is set correctly. If you do not already have an entry for either local: 0.0 or host:O.O (where host is the hostname of your system), XII will add it for you when XII starts. You can add the entry yourself. To check the DISPLAY environment variable, type:

env [Return)

• Check that you have the correct permissions for the . xllstart file in your home directory. Type:

11 .xllstart ~

The resulting permission should be at least:

-rwx---• Check the. xllstart file in your home directory for errors. Compare it with the sys. xllstart file in your system directory.

If none of the above seems to help, or you're not sure how to proceed, see your system administrator.

4

Dans le document the X Window System (Page 67-71)