• Aucun résultat trouvé

Several different initiatives have made strides in recent years to bring 3D desktop effects to Linux.

Ubuntu and Fedora used AIGLX (http://fedoraproject.org/wiki/RenderingProject/

aiglx). The openSUSE project originally backed the Xgl approach (http://en.opensuse.org/

Xgl), but has recently also moved to supporting AIGLX.

The goal of the Accelerated Indirect GLX project (AIGLX) is to add 3D effects to everyday desktop systems. It does this by implementing OpenGL (http://opengl.org) accelerated effects using the Mesa (www.mesa3d.org) open source OpenGL implementation.

Currently, AIGLX supports a limited set of video cards and implements only a few 3D effects, but it does offer some insight into the eye candy that is in the works.

Direct rendering infrastructure (DRI) is required for most video cards supporting AIGLX.

However, some NVidia cards that don’t support DRI can be used, but they require that you get the closed source binary drivers made available from NVidia. Cards that are known to not work with AIGLX include ATI Rage 128 and Mach 64, Matrox G200 through G550, and 3DFX Voodoo 1 and 2.

If your video card was properly detected and confi gured, you may be able to simply turn on the Desktop Effects feature to see the effects that have been implemented so far. To turn on Desktop Effects, select System ➪ Preferences ➪ Look and Feel ➪ Desktop Effects. When the Desktop Effects window appears, select Enable Desktop Effects. Enabling this does the following:

Stops the current window manager and starts the Compiz window manager.

Enables the Windows Wobble When Moved effect. With this effect on, when you grab

the title bar of the window to move it, the window will wobble as it moves. Menus and other items that open on the desktop also wobble.

Enables the Workspaces on a Cube effect. Drag a window from the desktop to the right

or the left and the desktop will rotate like a cube, with each of your desktop workspaces appearing as a side of that cube. Drop the window on the workspace where you want it to go. You can also click on the Workspace Switcher applet in the bottom panel to rotate the cube to display different workspaces.

Other nice desktop effects result from using the Alt+Tab keys to tab among different running windows. As you press Alt+Tab, a thumbnail of each window scrolls across the screen as the win-dow it represents is highlighted.

Figure 3-13 shows an example of a Compiz desktop with AIGLX enabled. The fi gure illustrates a Web browser window being moved from one workspace to another as those workspaces rotate on a cube.

FIGURE 3-13

Rotate workspaces on a cube with AIGLX desktop effects enabled.

The following are some interesting effects you can get with your 3D AIGLX desktop:

Spin cube

—Hold Ctrl+Alt keys and press the right and left arrow keys. The desktop cube spins to each successive workspace (forward or back).

Slowly rotate cube

—Hold the Ctrl+Alt keys, press and hold the left mouse button, and move the mouse around on the screen. The cube will move slowly with the mouse among the workspaces.

Tab through windows

—Hold the Alt key and press the Tab key. You will see reduced versions of all your windows in a strip in the middle of your screen, with the current window highlighted in the middle. Still holding the Alt key, press Tab or Shift+Tab to move forward or backwards through the windows. Release the keys when the one you want is highlighted.

Scale and separate windows

—If your desktop is cluttered, hold Ctrl+Alt and press the

up arrow key. Windows will shrink down and separate on the desktop. Still holding Ctrl+Alt, use your arrow keys to highlight the window you want and release the keys to have that window come to the surface.

Scale and separate workspaces

—Hold Ctrl+Alt and press the down arrow key to see

reduced images of the workspace shown on a strip. Still holding Ctrl+Alt, use right and left arrow keys to move among the different workspaces. Release the keys when the workspace you want is highlighted.

Send current window to next workspace

—Hold Ctrl+Alt+Shift keys together and

press the left and right arrow keys. The current window will move to the next work-space to the left or right, respectively.

Slide windows around

—Press and hold the left mouse button, and then press the left, right, up, or down arrow keys to slide the current window around on the screen.

If you get tired of wobbling windows and spinning cubes, you can easily turn off the AIGLX 3D effects and return Metacity as the window manager. Select System ➪ Preferences ➪ Desktop Effects again and toggle off the Enable Desktop Effects button to turn off the feature.

If you have a supported video card, but fi nd that you are not able to turn on the Desktop Effects, check that your X server started properly. In particular, make sure that your /etc/X11/xorg.

conf fi le is properly confi gured. Make sure that dri and glx are loaded in the Module section.

Also, add an extensions section anywhere in the fi le (typically at the end of the fi le) that appears as follows:

Section “”extensions””

Option “”Composite””

EndSection

Another option is to add the following line to the /etc/X11/xorg.conf fi le in the Device section:

Option “”XAANoOffscreenPixmaps””

The XAANoOffscreenPixmaps option will improve performance. Check your /var/log/

Xorg.log fi le to make sure that DRI and AIGLX features were started correctly. The messages in that fi le can help you debug other problems as well.

Documents relatifs