Xgl/Compiz in Mandriva 2007 Free
[ Friday, 2 February 2007, metatron ]
Xgl is a hardware accelerated X-server created by Novell. Thanks to the abilities of modern graphics cards, it uses three-dimensional rendering, which opens up a whole new bunch of possibilities for modern computer desktops.
Xgl has recently become very popular and it can be found in many GNU/Linux distributions such as Mandriva 2007, openSUSE 10.1 and 10.2, Aurox 12 or Ubuntu 6.10. However, this technology is not the only way to obtain three-dimensional desktop effects. The alternative is a graphics subsystem called AIGLX, developed by Red Hat and implemented in (among others) Fedora Core 6.
Xgl alone would not be very useful if there weren’t any window managers that could take advantage of its features. Compiz — the first compositing window manager is a very important part of Xgl technology. Its rival is Beryl, a Compiz fork which focuses on even more desktop effects, sacrificing some stability. The two managers are different products that have separate configurations. We are going to concentrate on Xgl and Compiz in this article from now on.
Xgl installation
I will be demonstrating Xgl and Compiz basing on my Mandriva 2007 Free (32–bit version) Linux distribution. I have a NVidia GeForce FX 5200 Ultimate card, so the examples are going to cover this configuration only.
System installation
I installed Mandriva in a pretty standard manner. I chose the default installation scheme, with the packages selected by the distributor. I did not install xgl, compiz or task – 3ddesktop packages on purpose, since I decided to do this manually after the installation. I recommend you to follow this way, too. The installation process went pretty smoothly and after some 30 minutes I had a working instance of Mandriva Free on my desktop.
Configuration of the repositories
At this stage, some repositories need to be set up so we can download some packages from the Internet later on. So, I opened up the system console, logged in as root by typing su and the root password. Then I copied the commands below and waited for each repository to be checked and added:
urpmi.addmedia main ftp://ftp.linux.cz/\
pub/linux/mandrakelinux/official/2007.0/i586/media/main/release/ with ./media_info/hdlist.czurpmi.addmedia contrib ftp://ftp.linux.cz/\
pub/linux/mandrakelinux/official/2007.0/i586/media/contrib/release/ with ./media_info/hdlist.czurpmi.addmedia --update updates ftp://ftp.linux.cz/\
pub/linux/mandrakelinux/official/updates/2007.0/i586/media/main/updates/ with ./media_info/synthesis.hdlist.czurpmi.addmedia --update plf-free ftp://ftp.free.fr/\
pub/Distributions_Linux/plf/mandriva/2007.0/free/release/binary/i586 with hdlist.czurpmi.addmedia --update plf-nonfree ftp://ftp.mandrivauser.cz/\
plf/mandriva/2007.0/non-free/release/binary/i586 with hdlist.cz
Caution! If you can’t download some of the packages or the repositories seem not available (links are inactive) it may be that the servers are overloaded or the location changed. In such case, you should read all error messages and look for other sources (repositories) consisting the same packages.
NVidia drivers installation
The thing that’s probably missing is a NVidia proprietary driver that supports the composite extension needed by Xgl (the default free driver nv unfortunately does not support it). Installing the driver in Mandriva is as easy as typing as root urpmi nvidia in the system console. If everything goes properly a table like this should appear:
More information about nvidia-8774-4plf2007.0.x86_64 IMPORTANT NOTE: This PLF provided NVIDIA driver must be configured differently than the one available from NVIDIA, so please follow the instructions below: If you are upgrading from a Mandriva Club or PLF provided NVIDIA driver, reconfiguring is usually unnecessary.
You can reconfigure X to use the new NVIDIA driver either automatically:
Run XFdrake as root.Go to the Graphics Card listSelect your card (it is usually already autoselected).Answer any questions asked and then quit.
OR you can do it manually by editing /etc/X11/xorg.conf:
Change the Driver to "nvidia" in the Device section.Remove any Load "glx" lines from the Module section.Add the following line to the Module section: Load "/usr/lib64/xorg/modules/extensions/nvidia/libglx.so"Run "update-alternatives --config gl_conf" and select nvidia.conf.
So, now all we need to do is to follow the instructions provided by the manufacturer. I used a text editor called VIM, so I typed vim /etc/X11/xorg.conf and applied the suggestions above.
Components 3D desktop installation
Finally, the time has come to install the three components I mentioned at the beginning. Type the following in the system console (logged in as root):
urpmi Xglurpmi compizurpmi task-3ddesktop
Now, open up the console again and type glxinfo | grep direct. If the result is direct rendering: Yes, probably after restarting X, you will see three-dimensional desktop. However, it can also work when the result is direct rendering: No the performance will be worse in this case. The only way to find out is rebooting (or restarting the X server by hitting the CTRL+ALT+BACKSPACE key combination).
Before logging in, you have to alter the Session Type to drax3d on the KDM login screen. The system may ask yous for the root password at this time. Now, on the logging screen two options should be included: a normal desktop and a 3D desktop. So, 3D and finally log in to KDE. Voila! If you followed the instructions properly, the 3D desktop should be already set up on your machine.
Configuration
If Xgl acts correctly, you have a chance to configure the graphics effects. Therefore you have to choose from main menu: System -> Configuration -> Configure Your Computer -> Hardware -> 3D and then run Compiz configuration and switch to the Plugins tab. Unfortunately you have to restart your KDE session after each change if you choose to configure Compiz this way. There is a much better way, however. It is to use the command gset-compiz in the system console. When you use gset-compiz, you do not have to restart your session to see the effects. You do not have to even close the gset-compiz, since the changes are saved automatically this way.
Using Xgl/Compiz
When I finally activated Xgl for the first time, I was impressed by what I saw. The new three-dimensional world was very attractive, but later on I found it very useful as well. Here I’m going to present some of my favorite Compiz effects.
Compiz is plugin-powered. Most of the features are available as plugins. Each plugin has it own tab in gset-compiz where it can be configured.
Scale function
This is one of my favorites. Scale means that even if I open many windows and I do not bother to minimize them, I’m still able to choose the one which I’m looking for. Notice, that this option doesn’t work when you choose to minimize a window. The only way to access such window is to use the traditional Alt+Tab shortcut.
The cube
The cube is one of the most recognizable features of Compiz. It enables to treat the desktop as a cube where each virtual desktop is one of its layers. In the plugin configuration, you can choose whether you want to be located inside or outside of the cube (see the video to notice the difference). Thanks to the cube it’s much easier to remember which application is located on which virtual desktop and it helps to organize the running applications even better.
There is also an option to change the color or wallpaper of the top or bottom face of the cube. Unfortunately, when I picked up Images option and chose one of the wallpapers, the Mandriva logo of Mandriva did not disappear from the top face. Moreover, after exiting the program, the wallpapers were missing. A minor bug, but it reminds us about the still experimental phase of the whole Compiz manager.
Other plugins
Some of the other important plugins are Fade, Minimize and Rotate. In the options you can basically set the speed of the effects provided by those plugins. Another interesting plugin is Water, but when I activated it, my computer slowed down significantly. Of course you are not stuck with default plugins and you can download extras from the Compiz website. When downloading the extra plugins, watch the Compiz version they work with. Mandriva 2007 offers Compiz 0.3.4, but while I’m writing these words, 0.3.6 has been already released.
Keyboard shortcuts
Here are some of the important keyboard shortcuts that are very useful when playing with Compiz.
- Alt + Ctrl + Right – rotate right
- Alt + Ctrl + Left – rotate left
- Alt + Ctrl + Shift + Right – window right
- Alt + Ctrl + Shift + Left – window left
- Alt + Ctrl + Down – unfold
- Alt + Ctrl + Up – scale
- Alt + Tab – switch between windows within one desktop
- Alt + Ctrl + Tab – switch between windows within several desktop
- Alt + Scroll over the window – transparency
- Shift + F9 – toggle rain
- Shift + F3 - zoom
- Shift + F12 - cube control using mouse
A live presentation of Xgl/Compiz in Mandriva
OK. You know how to install and configure Compiz in Mandriva now, but you may ask — how does it look live? Is it really so useful that I should try it out? Well, I prepared a special presentation for you so you can see it yourself. If you do not like Flash, you can download the OGG file: Xgl/Compiz in Mandriva by metatron[.ogg 10.9MB]. So, take a seat, make yourself comfortable and watch the presentation of Xgl/Compiz in Mandriva 2007 Free!
More information
- Compiz website
- Beryl website
- Compiz howto on openSUSE website
- Xgl vs AIGLX
- Xgl/Compiz in Mandriva by metatron[.ogg 10.9MB] [here is a local mirror of this file]
- Xgl/Compiz in Mandriva by metatron[YouTube.com]
Subscribe to RSS feed for this article!
3 Comments
- A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
- Strong text: <strong>Strong text</strong>,
- Italic text: <em>italic text</em>,
- Strike: <strike>
strike</strike>, - Code: <code>
printf("hello world");</code>, - Block quote: <blockquote>Block quote</blockquote>




















for me 3d desktop works only for KDE not GNOME
Hey, thanks for the guide. I got this set up in less than 30 minutes.
http://nudekimkardashi.blog.drecom.jp