• Aucun résultat trouvé

As with everything in life, some management is required (just as with your X Windows System). You need to know how to change the size of the screen area, select window managers, and close the X server without the graphical interface.

After all, all software experiences glitches and sometimes locks; the same is true with the X Window System, too.

When you configure the X environment, you can choose to use more than one screen size. As soon as X starts, whether with xdmor startx, you can change the screen size with keystrokes. To make the screen size larger, press Ctrl+Alt++.

Likewise, Ctrl+Alt+- makes the screen size smaller. Using these key sequences, you can scroll through the screen size options.

In some instances, you may need to temporarily change the screen size to see an entire window on one screen. Most window managers allow for virtual desktops.

This means that the desktop area is actually larger than the resolution of the screen. Window managers can have from two to eight virtual desktops. This can be handy once you get used to it. Each desktop can have its own background and can hold on to any window you open in that area. You can also move windows from one desktop area to another by dragging them.

The virtual desktop really comes in handy when you have a low-resolution system.

You can use one desktop for your clock and calendar, another for monitoring tools, and yet another as your workspace — all without having one desktop area cluttered with windows everywhere.

Occasionally, you may lose mouse control, open windows may lock up, corruption of the X environment may occur, or you may not be able to close the X environment (this doesn’t happen very often). A keyboard command sequence closes all win-dows and shuts down the X system — Ctrl+Alt+Bksp. If you use startxto start X, then you return to a command prompt. If you use a desktop manager, then you return to the graphical login screen after X restarts through the desktop manager.

Another solution is to go to a different virtual terminal using the keyboard. The default Debian installation is configured with six virtual terminals. You can access them using CTL+ALT+F#, where #is a number from one to six. Debian has the X console set to F7, which means that when you are ready to return to the current X session, press CTL+ALT+F7.

Another maintenance issue is choosing your own window manager. No matter how you start your X session, you can customize which window manager gets started.

This is true for each account on the system. Debian installs a default window man-ager, but you can override the default for your account. Create a file called .xsessionin the home location of your account. The contents of the file are in text form and look something like the following:

xterm exec fvwm

When the X session first opens, an xtermsession also automatically opens and the FVWM window manager is used. You can insert the name of any applications you want to open at startup. This file is a script, so any valid scripting is executed.

To learn more about scripting, check out Chapter 14.

If you have problems with the X session, check in the .xsession-errorsfile of the account (in the home directory of the account) for clues to the problem. Or, if you happen to use xdm, then check out /var/log/xdm.logalso. The desktop manager can have something to do with which window manager you use. If you employ the gdm desktop manager for GNOME and now want to use FVWM2 as your preferred window manager, you may need to stop the gdm window manager before switching so you don’t end up back with GNOME.

Cross-Reference

Installing and Using Window Managers

In order for the graphical user interface to function, you must use a window man-ager. The window manager sits between the applications and the X server. It pro-vides the control for the applications, interprets the graphical requests from the applications, and conveys them to the X server where the information is displayed for you to see.

Over the years, developers have created a number of window managers. Only a few are covered in this chapter, however. The window managers discussed here are the most commonly used.

FVWM

As one of the older, more traditional window managers found on UNIX systems, FVWM has evolved into several versions. Although each version is based on the same premise, the look and feel of each differs a little. Figure 4-6 shows FVWM, the original of the three. Notice the traditional look and feel of the UNIX window manager.

Figure 4-6: An example of the FVWM desktop

The second of the three window managers tries to model itself after the look and feel of the common PC operating system Windows 95. You can see from Figure 4-7 that FVWM95 includes a Start button and a task bar at the bottom of the screen.

Each application that is opened also shows up on the task bar. The Start button produces the menu for the system in the same way that the Start button produces the menu for Windows.

Figure 4-7: FVWM95 tries to look like the popular Windows 98 or Me.

The original version of FVWM has been around for a while, so updates have resulted in a spin off: FVWM2. This window manager combines the simplicity of the original window manager with up-to-date graphics controls. Like the other window managers, they allow for extensive customization of nearly every aspect. The default configuration file resides in /etc/X11/fvwm. If you copy system.fvwm2rc to your home directory with the name .fvwm2rcfrom your own directory, you can make as many modifications as you see fit.

Using the window manager environment without a mouse can get tricky, so I include some of the default keyboard controls in Table 4-4. You can reconfigure these controls to suit your preferences in the .fvwm2rcfile. Other key commands appear in the configuration file itself.

Table 4-4