Sunday, April 15, 2007

Compiz and Ubuntu Feisty Fawn (ATI X1400 + fglrx + compiz)

After a long struggle I have finally managed to create an easily reproducible method of starting Compiz with ATI X1400 and restricted drivers on Ubuntu 7.04 (Feisty Fawn). Feisty aims to support Compiz via AIGLX (as far as I could tell), the best way to get it running though is through Xgl.

First thing you will need to do is get the fglrx driver from ATI. The best way to enable this is:

1. Enable ATI accelerated graphics driver

System -> Administration -> Restricted Driver Manager

It is recommended that you restart your computer after you "select enable".

2. Grab the following listing and put it in a file called xgl.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Comment=Start an Xgl Session
Exec=/usr/local/bin/startxgl
Icon=
Type=Application
3. sudo cp xgl.desktop /usr/share/xsessions/

4. Grab the following listing and put it in a file called startcompiz
#!/bin/bash # # Start beryl-manager within gnome-session # if (( `ps -A -o comm | grep -c '^Xgl$'` == "1" )); then DISPLAY=:1 gnome-settings-daemon & DISPLAY=:1 compiz --replace else echo "${0}: Error: compiz not launched. Xgl not running?" fi

5. sudo cp startcompiz /usr/local/bin/

5a. sudo chmod a+x /usr/local/bin/startcompiz

6. Grab the following listing and put it in a file called startxgl
#!/bin/sh
Xgl -fullscreen :1 -ac -br -accel glx:pbuffer -accel xv:pbuffer &
sleep 4
export DISPLAY=:1
exec gnome-session

7. sudo cp startxgl /usr/local/bin/

7a. sudo chmod a+x /usr/local/bin/startxgl

8. sudo apt-get install xserver-xgl

9. System -> Preferences -> Sessions -> New


- Name : Compiz
- Command: startcompiz


10. You will need to Log Out, then login using the Session : Xgl

You should now have compiz :-)

11. sudo apt-get install gnome-compiz-manager

You find this program under System -> Preferences -> GL Desktop to fine-tune compiz.

15 comments:

Anonymous said...

Hi nice howto, might want to check the right on those files in /usr/local/bin/ tho

stephanbuys said...

Oops :-) Thanks for the tip - I have ammended the HOWTO

Anonymous said...

You should sudo those chmod's too...

Kevin said...

After switching to the Xgl session, I get to the desktop but everything's distorted. Text is illegible, windows leave blocky trails when dragged... Does anyone have a fix?

stephanbuys said...

Added SUDO - thanks!

rollerskatejamms said...

it works great, but it makes ubuntu so ugly :-(

It uses defualt debian icons.

stephanbuys said...

If the icons are wrong please make sure you are using the "startcompiz" script. I found that when it calls: "gnome-settings-daemon" the icons are displayed correctly.

Anonymous said...

wolfman:
I cant make the gnome theme start automatically. please help, email mr._x@shaw.ca

Dooma said...

Thanks for putting this up.

You wrote:
If the icons are wrong please make sure you are using the "startcompiz" script. I found that when it calls: "gnome-settings-daemon" the icons are displayed correctly.

How do I check to see if I'm using "startcompiz?

stephanbuys said...

I would recommend checking in System -> Administration -> System Monitor (Processes) if the compiz and gnome-settings-daemon is running.

MArco said...

I have a problem whit the layout and -at- key and other...

somebody have the solution ?

Dotan Cohen said...

Any idea how to get this to work with KDE? This is the first tutorial that helped me get Compiz running, but Gnome, while nice, does not meet my requirements for a work desktop.

Thanks!

stephanbuys said...

In "startxgl" replace "exec gnome-session" with "exec startkde".

Not to sure about which changes to make in "startcompiz" - perhaps just comment out "gnome-settings-daemon"

Unknown said...

Have you tried with Ubuntu 7.10 ?

Unknown said...

Yes, it works with 7.10. Thanks for the how-to! I was seriously considering downgrading to an Intel-integrated for a while.