debian 下面使用 compiz
时间:2006-11-27 来源:linuxzfp
Debian HOW-TO : AIGLX + Compiz
Last revision : November 15th, 2006You've got this Debian machine, and yet you want to use the famous "3D desktop" everyone's talking about ?
On Debian Etch (or Sid), it is surprisingly easy to configure a "3D desktop".
Here is how to do it.
- Prerequisites
This guide assumes that you have direct rendering enabled. In other words, the output of
glxinfo | grep direct
should say (if glxinfo doesn't work, make sure you have the package mesa-utils installed) :
direct rendering: Yes
If not, make sure your card is properly configured and that the drivers for it are rightly set up. If you need help about that, refer to the tutorial on NVIDIA drivers or the one on ATI drivers.
- xorg.conf
A few changes have to be made to the file /etc/X11/xorg.conf.
In Section "Module", make sure you have
Load "dbe"
in first position.
In Section "Device", ensure you have
Option "XAANoOffscreenPixmaps" "true"
in last position. Plus, if you don't already have a Section "Extensions", add one somewhere (still in your xorg.conf) :
Section "Extensions"
Option "Composite" "Enable"
EndSection
Also, NVIDIA users should use at least the 1.0-9629 version of the driver for AIGLX to work. and make sure that they have those 2 lines in the Section "Screen" of their xorg.conf file :
Option "AddARGBGLXVisuals" "true"
DefaultDepth 24
As well as this line in Section "Device" :
Option "AllowGLXWithComposite" "true"
- AIGLX
Starting with xorg 7.1, AIGLX is integrated in the X server. Also, it should get loaded automatically. Ensure that it does :
cat /var/log/Xorg.0.log | grep -i aiglx
which should say (==) AIGLX enabled. If it doesn't get loaded, you can force it by adding :
Option "AIGLX" "true"
to Section "ServerLayout" of your /etc/X11/xorg.conf.
- Compiz
Compiz's installation is quite straight forward. First install the required packages :
sudo apt-get install compiz
Then, add Compiz to your desktop environment (Gnome, KDE, or Xfce4) startup script.
Go in Desktop -> Preferences -> Sessions. Then choose the Startup Programs tab and add an entry for Compiz :
compiz --replace --fast-filter
Simply create a file ~/.kde/Autostart/compiz.desktop with this content :
[Desktop Entry]
Encoding=UTF-8
Exec=compiz --replace gconf & gnome-window-decorator &
GenericName[en_US]=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-KDE-autostart-after=kdesktop
First edit the file /etc/xdg/xfce4-session/xfce4-session.rc and comment the lines regarding xfwm4 :
#Client0_Command=xfwm4
#Client0_PerScreen=False
Secondly, you must create a file ~/.config/autostart/compiz.desktop taking care of compiz start :
[Desktop Entry]
Name=No name
Encoding=UTF-8
Version=1.0
Exec=compiz --replace --fast-filter --use-cow
X-GNOME-Autostart-enabled=true
That's it. Restart the X server and you are good to go.
- Tips
You can view my xorg.conf here.
Issuing this command :
grep -A 2 '<' /usr/share/gconf/schemas/compiz.schemas
will give you a complete list of the Compiz shortcuts.
If you get any weird issues with Compiz(ie windows' borders disapear), simply erase the gconf entry of compiz :
rm -r ~/.gconf/apps/compiz/
and restart GNOME.
posted by Hugues @ Thursday, October 19, 2006 18 comments links to this post
18 Comments:
At 6:31 AM, November 06, 2006, Anonymous said...This really needs to be easier - hacking a bunch of config files to reach 'normal' isn't the Debian way. Why can't an "apt-get install compiz" take care of everything for you?
At 9:17 AM, November 06, 2006, Hugues said...
I hear what you say, I think so too.
But, then again, the only file you need to edit is /etc/X11/xorg.conf. For that, you can rely on the example xorg.conf mentionned in the article.
And finally you need to start Compiz at Gnome start by adding it to Gnome's Session Manager.
As Compiz & AIGLX just entered Etch, this will no doubt get easier in the future.
Anyway, thanks for the feedback !
What about KDE? Is this only for Gnome?
At 6:04 PM, November 06, 2006, Anonymous said...Actually you don't even need AIGLX to run compiz with nvidia beta drivers.
At 7:27 PM, November 06, 2006, Hugues said...
"Actually you don't even need AIGLX to run compiz with nvidia beta drivers."
Apparently that's true : I did test NVIDIA beta drivers with Compiz without using the "indirect-rendering" option (an disabling it in /usr/bin/compiz), but without any performance improvement.
Anyway, AIGLX is integrated in Xorg 7.1, so there is no extra configuration required nor performance penalty in using it.
Hey what about us KDE guys, how we enable this ?
Thanks.
Ok mofo :)
I've added a part for KDE users. I'll be adding one for XFCE fans as well.
Thanks for the feedback.
I do my best to regularly update most of this blog...
OK so far I've followed the instructions and it works.
The following are some observations:
Under KDE
Gnome takes control of windows, resizing positioning and etc. this is due the line:
Exec=compiz --replace gconf & gnome-window-decorator &
I don't like this 'cause I am very used to the combination of Meta+right_click to resize & Meta+left_click to move windows, and I don't know how to handle this on gnome :( 'cause resizing à la gnome requires to put the cursor on the edges of the window AFAIK and even doing that I don't always get the correct resizing (is this because compiz?)
Another thing is that you only can have 4 desktops, no more no less, is this correct?
Also can anyone point to a good tutorial about controlling this like pressing Ctrl+Meta+left_click transforms the desktop in a cube that you can rotate, what other combinations exist?
Please excuse my poor knowledge on this matters, still they are very interesting.
The tutorial is great.
Many thanks.
OK to answer some of my questions hehehe ;)
Some controls are:
Alt+Tab to show a 'dock' which contains some tiny screenshots and you can cycle through them
Ctrl+Alt+Left/Right keys will cycle the desktops in the cube fashion
Ctrl+Alt+Up key will make thumbnails of all the windows in the actual desktop, so you can select any window in case you are lost in you own desktop, very handy :)
Ctrl+Alt+Down key will display the desktops in a horizontal 'film strip' like way very neat, press Left or Right keys to move between destops.
Of course Ctrl+Alt+Left click for cube rotation
Windows opacity change if you use the scroll of your mouse over any of them, so you can see what is behind though?
What other key combinations / mouse do you know?
Thanks.
You pretty much summarized the commands I use as well.
You can check out the "TIPS" section of the tutorial, I've added a command which gives a list of all available Compiz shortcuts.
Thanks again for the feedback !
What about those of us who refuse to be enslaved by desktop managers, and prefer to simply use a window manager?
Now that I've edited my xorg.conf file, and installed the mesa-utils and compiz, what should I add to my .xinitrc file and/or window-manager configuration file?
I use JWM, with all of its 168K memory footprint.
JWM ?
Looks interesting indeed.
I'll give it a serious try and see if something can be done.
Thanks for reading !
Hi Jonathan,
I did take a look at JWM, and I think it is excellent : light, but still very easy and functional.
Anyway, using Compiz with it doesn't appear to be feasible, as JWM is a window manager itself. Compiz normally replaces your window manager, so you have to kill your existing one to run it.
Perhaps I'm missing something here, but I don't think it is doable without some serious hacking.
If you are brave and know your way around in C, you can try to work something out I guess. But then it won't be JWM anymore. Or you can write to the author of JWM, see if he has an idea about this.
Thanks for the feedback !
The best guide i found and everything worked as a swiss clock. many thanks amigo
At 11:41 AM, November 19, 2006, impact24 said...
Hi hugues,
This is really the most straightforward guide available...I got it to work under my amd64 sid and it works great.
Just a question though, where did you find out about how to edit the X11 config files? I couldn't find the relevant docs under /usr/share/doc/compiz-(gnome). Perhaps I'm looking in the wrong place?
Anyway, great tutorial and great blog. More power to you.
I did look for a while before finding "the right way" to do it. There are a few guides here and there that helped me found the actual working instructions. Here are a few :
http://people.debian.org/%7Eterpstra/message/20061001.103718.7dc8e9cd.en.html
http://gandalfn.wordpress.com/howto/howto-compiz-aiglx-on-edgy/
http://forum.beryl-project.org/post-40601
Thanks !
Hi, I added the command
compiz --replace --fast-filter
via settings -> sessions in Gnome, and now I get a really wierd screen, sometimes fully white, sometimes all kinds of colors. I was wondering if you could help me (I'm a complete newbie) and let me know how I can access the startup entries so I can remove this command. The only session which works now is the failsafe terminal session, so I was hoping you might be able to let me know how I can delete this command using the terminal.
Thanks, I would really appreciate the help!
Hi,
If things went wrong, just erase the directory ~/.config (so that means /home/yourself/.config) and the compiz entry in your system startup will get erased.
Hugues
Post a Comment
Links to this post:
<noscript>See links to this post</noscript>posted by Jacob @ 12:25 AM, November 17, 2006 Debian HOW-TO : AIGLX + Compiz You've got this Debian machine, and yet you want to use the famous "3D desktop" everyone's talking about ? Read the full article.
posted by @ 1:03 AM, November 07, 2006
Create a Link
<< Home