Google

2006-08-12

compiz on Ubuntu Dapper

[LAST UPDATED ON 2006-08-16]

After seeing compiz videos at eHomeUpgrade, I could hardly wait to try it on my Ubuntu. I have an HP X6000 Workstation with nVidia 980 XGL card which is not of course that great to show all the great effects compiz offers. Plus I was disheartened at some blog entry because I did not have direct rendering enabled on my card :
adil@ahlnx:/etc/apt$ glxinfo  grep rendering
direct rendering: No
but none of them proved to be a show stopper! I had to try a few things to get this working so bear with me...

First thing first, I backed up my /etc/X11/xorg.conf and /etx/apt/sources.list
Then edited /etc/X11/xorg.conf as described here.

It was time to add additional repositories so that I could download and install compiz and dependent packages again as described in the link above. I added the followings into /etc/apt/sources.list
deb http://www.beerorkid.com/compiz/ dapper main
deb http://xgl.compiz.info/ dapper main
deb http://media.blutkind.org/xgl/ dapper main

Then installed the GPG key:
wget http://www.beerorkid.com/compiz/quinn.key.asc -O - sudo apt-key add -
Updated the available package list:
sudo apt-get update
and finally installed the packages:
sudo apt-get install xserver-xgl compiz-gnome gset-compiz
Edited the /etc/gdm/gdm.conf-custom and added the followings
---------------------------------
[servers]
0=Xgl

[server-Xgl]
name=Xgl server
command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:pbuffer
flexible=true
Updated (Automatix Bleeder) script

=================================
adil@ahlnx:~$ more /usr/bin/toggle-compiz-nvidia
#!/bin/bash
if ps -A grep -e "compiz.real$" > /dev/null; then
killall cgwd
metacity --replace &
else
cgwd &
compiz --replace gconf &
fi

=================================

If you do not use Automatix Bleeder, make sure you can execute it
sudo chmod 755 /usr/bin/toggle-compix-nvidia

I actually use a different name:
sudo mv /usr/bin/toggle-compix-nvidia /usr/local/bin/startcompiz


Effects are mind blowing. To have an idea what my desktop is like now, watch this YouTube video or see the below post

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

TIPS & TRICKS
As I keep on reading and learning more and more on compiz,
I decided to add some more tips...

1) When ubuntu Logon Screen shows up I have an option for XGL
Here is the content of my xsessions
sudo gedit /usr/share/xsessions/xgl.desktop
---------------------------------
[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Comment=Start an Xgl Session
Exec=/usr/bin/startxgl.sh
Icon=
Type=Application
---------------------------------
If you have do not see any effects, try to start compiz-start script we created
above. To see session start up errors, take a look at your xsession-errors file
gedit ~/.xsession-errors
2) Remember, you can find tons of info on compiz forums

3) Obviously, ATI configuration is different than nVidia. For example,

in /etc/gdm/gdm.conf-custom>

[servers]
# Override display 1 to use Xgl (DISPLAY 1 IMPORTANT FOR ATI FGLRX).
1=Xgl

For nVidia screen is always 0 not 1!

4) When checking forumg, if you need to find out whether you have a
package already installed try:

dpkg -s  grep -i status
eg.
adil@ahlnx:/usr/local/bin$ dpkg -s compiz grep -i status
Status: install ok installed
5) Use `xvinfo` to confirm that your
color depth is set to 24 bit

6) To check what plugins you have, run gconf-edit & browse to
"apps/compiz/general/allscreens/options"
double click active_plugins, you should see things like
gconf decoration reflection blur wobble fade minimize cube rotate zoom
scale move resize dbus switcher water trailfocus state showdesktop neg bs
If you do not try adding them in that order as there are dependencies
(one per line)

7) Sometimes you see an application is missing a window decorator,
eg. my firefox was missing it, use ALT + Mouse to move that window ;)

8) There are some really nice themes for compiz , heres how to install them:
You will need the following packages:
gcompizthemer
cgwd
After you have installed the packages , edit /usr/local/bin/startcompiz
And change it like this:
---------------------------------
#!/bin/sh
killall gnome-window-decorator
wait

cgwd &
compiz --replace gconf &
---------------------------------
Restart compiz / reboot.
Go to System , preferences and you will find Compiz Themer there.

Apparently there used to be a gcompizthemer-themes package, which is now
part of cgwd package, which will appear in
System > Preferences > CGWD Themes menu

9) If you do not want the XGL session restart when you press shift+backspace, add this to your start up script: (toggle-compiz-nvidia or startcompiz)
xmodmap -e "keycode 22 = BackSpace BackSpace Terminate_Server"

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
So, what's not working?
Well, after reboot, if I choose XGL session, it does not start.
I see some errors in the ~/.session-errors log...

The workaround?
Well, I asked in Automatix Bleeder forum and arnieboy suggested this:
"revert your gdm-custom.conf to its original shape and try again. you told me in #Automatix yesterday that you already have gdm set up to start xgl. you need to change that to NOT let gdm start up xgl by default (in other words, revert it back to the default) and try loggin in to the xgl session from gdm (after restarting)."
That did the trick. No more issues logging into XGL session.

No comments: