As promised! This is the most complicated linux issue posted here. Not a linux expert here but managed to get xgl and compiz working with Ubuntu. Thus, this is a short compiled “how-to” install xgl+compiz on an Ubuntu linux machine.
The machine I’m using is Acer 3210 laptop with ATI Mobility X700. I’ve been reading around and it seems that many people have problems running xgl on their Acer laptop with ATI cards. There ain’t much help out there either! haha.. Since I’ve successfully installed mine, I’d like to share to everyone else out there who are pulling their hair right now as I blog, trying to get their Ubuntu + XGL&Compiz to work. haha… It wasn’t easy for me either. I had to re-install Ubuntu twice because X-server won’t load. I took almost 3 seperate days to bug the problem. Finally its done! I’m so pleased with it really! haha..
Firstly, I’d like to thank the people from ubuntuforums.org for providing me the support needed. (though I must say there are too many disjointed and redundant help there) And of course not forgetting Quinn’s forums too!
From my previous post, you saw what XGL+Compiz can do to your linux desktops. The wobbly windows, the rotating desktops, the fine looking menus and the wonderful features that can be found when you merge linux with XGL+Compiz.
Before we start installing the packages from the repos, you’d first need to see that your VGA card is running with fglrx drivers. To see whether it is running on fglrx, type in:
>> fglrxinfo
If your machine screams:: OpenGL vendor string: ATI Technologies Inc , then you are safe. Else, you need to download and install the latest fglrx drivers. To do so, just follow these simple steps.
1. Install latest kernell drivers if you haven’t lately.
>> sudo apt-get install linux-686
2. Install the xorg-driver-fglrx package
>> sudo apt-get install xorg-driver-fglrx
3. Add fglrx to /etc/modules
>> echo fglrx | sudo tee -a /etc/modules
4. Reconfigure your x-server
>> sudo dpkg-reconfigure xserver-xorg
Make sure you chose fglrx instead of ati for the driver of your VGA card. After reconfiguring, make sure that fglrx is the chosen driver under your /etc/X11/xorg.conf file. It should look something like this, under Device:
Section Devices:
.
.
Driver “fglrx”
.
.
EndSection
If it says something like mesa or ati, change it to fglrx. Restart your computer after everything is correctly in place.
Now its time to install XGL+Compiz files. Firstly, you’ll need to add some lines to your repos lists. Open up the list under your synaptic package manager and add these lines into the repos lists:
deb http://xgl.compiz.info/ dapper main
deb http://www.beerorkid.com/compiz/ dapper main
Then, do an update.
>> sudo apt-get updates
After that, install all the needed packages.
>> sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome (in one single line)
This will take sometime to finish downloading and installing. After everything is installed properly, (make sure there ain’t no packages unsuccessfully installed, else re-install everything again) you’ll need to change some of the items in your xorg.conf files. Its good to make a backup first of the file, so that if anything went wrong, you can just revert back to the original file.
Make backup of the xorg.conf file.
>> sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig
Then edit your xorg.conf file.
>> sudo nano /etc/x11/xorg.conf
Look for the “modules section”. You’ll need to comment out certain lines in this section and add other lines in them.
# Load “GLcore” <--- comment this
Load "dri" <--- add this
Load "glx" <--- add this
Then look for the devices section. There are some issues conflicting the ATI cards with XGL which causes the system to hang suddenly. This bug is called “Hard locks”. To work around this bug, you got to add some lines and make sure its the same as mine. My xorg.conf file…
Section “Device”
Identifier “ATI Technologies, Inc. Radeon Mobility X700 (RV410 PCIE)”
Driver “fglrx”
BusID “PCI:1:0:0″
Option “UseFBDev” “true”
Option “KernelModuleParm” “agplock=0″
Option “no_accel” “no”
Option “no_dri” “no”
Option “DynamicClocks” “on”
Option “mtrr” “on”
Option “DesktopSetup” “Single”
Option “ScreenOverlap” “0″
Option “Capabilities” “0×00000000″
Option “CapabilitiesEx” “0×00000000″
Option “VideoOverlay” “on”
Option “OpenGLOverlay” “off”
Option “CenterMode” “off”
Option “PseudoColorVisuals” “off”
Option “Stereo” “off”
Option “StereoSyncEnable” “1″
Option “FSAAEnable” “no”
Option “FSAAScale” “1″
Option “FSAADisableGamma” “no”
Option “FSAACustomizeMSPos” “no”
Option “FSAAMSPosX0″ “0.000000″
Option “FSAAMSPosY0″ “0.000000″
Option “FSAAMSPosX1″ “0.000000″
Option “FSAAMSPosY1″ “0.000000″
Option “FSAAMSPosX2″ “0.000000″
Option “FSAAMSPosY2″ “0.000000″
Option “FSAAMSPosX3″ “0.000000″
Option “FSAAMSPosY3″ “0.000000″
Option “FSAAMSPosX4″ “0.000000″
Option “FSAAMSPosY4″ “0.000000″
Option “FSAAMSPosX5″ “0.000000″
Option “FSAAMSPosY5″ “0.000000″
Option “UseFastTLS” “0″
Option “BlockSignalsOnLock” “on”
Option “UseInternalAGPGART” “no”
Option “ForceGenericCPU” “no”
Option “PowerState” “1″
EndSection
Now we’re done installing the necessary files and made sure that everything is quite in place. Next, there are 2 ways where you can make sure that XGL is loaded everytime your linux boots. The first way is to change some crucial files in your system so as to start with XGL. The second way is just to add a script that loads XGL on logging into the system. I’ll go with the second way because it is safer then the first way and you can just revert back to the original state just by restarting your system. We need to create 2 files.
>> sudo gedit /usr/bin/startxgl.sh
You need to at these into the file…
#!/bin/bash
Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:1
gnome-session
Save the file and create a second file like so…
>> sudo gedit /usr/share/xsessions/xgl.desktop
You need to add these into this file…
[Desktop Entry]
Encoding=UTF-8
Name=XGL Exec=/usr/bin/startxgl.sh
Icon=
Type=Application
Save this file and close it. Next you’ll need to make sure that you’ve chmod it correctly. You’ll need to type these…
sudo chmod 755 /usr/bin/startxgl.sh
sudo chmod 755 /usr/share/xsessionsxgl.desktop
Lastly, you’ll need to make sure that XGL starts with your X-server. So you need to add these in your session. Go to System -> Preferences-> Sessions. Go to the last tab and click new. Add this line into the box.
compiz –replace gconf decoration wobbly fade minimize cube rotate zoom scale move
resize place switcher
Then we need the windows decorator to start with XGL. Go to System -> Preferences-> Sessions. Go to the last tab and click new. Add this line into the box.
gnome-window-decorator
Close the session window and logout of your current session. At the login window, click session and choose XGL. Login as usual and when you are prompted whether you wanna make it a default session, click no. (well if you want it to be default, then by all means click yes!) Wa’la!! Your new Ubuntu interface is ready for use. Here are some typical common basic keys.
– Ctrl+Alt+Left/Right (rotate cube)
– Ctrl+Alt+Shift+Left/Right (focus)
– Ctrl+Alt+Left mouse click and drag mouse (to rotate)
– Alt+Tab (to switch screens windows vista style)
– Superkey+right click / wheel (zoom in or zoom out)
– Alt + mouse wheel (opacity of window)
– Move mouse pointer to the top right corner to arrange windows
That is it! ahhh.. such a long post!! haha… Wish you guys trying the very best of luck! Don’t give up man! haha… The patience is worth striving for! Now I just love my linux interface! It is sooooooo uber sleeeeeeeeeeeek! hahaha…





