===== Enabling Compiz-fusion desktop =====
Have you been wanting the uber-cool rotating desktop cube? Have you been wanting wobbly windows? Well, it turns out you can have them. Even a stock out-of-the-box eee with 512 meg of ram and eeeXubuntu installed with no swap can run compiz-fusion, give you those things and not crawl. It's amazing but true, and it's pretty easy to do.
The following is adapted from several sources:
* [[http://forum.eeeuser.com/viewtopic.php?id=6202]] this thread on the forum - which points to
* [[http://forum.eeeuser.com/viewtopic.php?id=5664.]] this thread with basic instructions - which points to
* [[http://xubuntublog.wordpress.com/2007/12/09/xubuntu-compiz-pretty-pretty-xubuntu/]] this blog post and also
* [[http://forlong.blogage.de/article/2007/8/29/How-to-set-up-Compiz-Fusion]] this web page for some pointers
The following assumes you're running eeeXubuntu r3. If you haven't already done so, you **//need//** to enable 3d rendering before anything else. Follow the instructionsn at [[ubuntu:eeexubuntu:customization:|eeeXubuntu - What next?]] under the "Direct Rendering" heading. You might want to do the REST of the fixes there too before tackling this.
==== Installation ====
**Do //not//** just install the //Compiz// package out of synaptics. It installs a huge chunk of the gnome desktop, and we were avoiding that by installing Xubuntu. Instead, you're going to get a selection of packages. You can do this by selecting them individually in synaptic, or the following uses apt-get from a terminal.
sudo apt-get install libgl1-mesa-dri
You may already have this if you have installed the eeecamtray app described above.
sudo apt-get install compiz-core compiz-plugins compiz-fusion-plugins-main compiz-fusion-plugins-extra emerald compizconfig-settings-manager
That apt-get is wider than the screen. Make sure you got all the packages.
* compiz-core
* compiz-plugins
* compiz-fusion-plugins-main
* compiz-fusion-plugins-extra
* emerald
* compizconfig-settings-manager
Next, go to //Applications - Settings - Window Manager Tweaks// and make sure that composite is unchecked. It is by default, but if you had turned it on in the XFCE window manager to get translucent effects, it will bork compiz. You can't run two compositors at the same time, so make sure it's off.
==== Pre-run configuration ====
You do not want to run compiz until you've done some configuration work to set it up correctly for the eee. Be patient, the time invested will pay off.
In your terminal, bring up the Compiz Config settings manager. This is going to be a bit of a pain to use, because the windows are all larger than the screen. Remember to use alt-left click to drag the windows which are larger than the screen around so you can see everything. In a termial type:
ccsm
You need to set several things in CCSM before running compiz the first time.
* Optimize for the small screen
* under General/Focus and Raise Behavior, turn off Click To Focus, Auto Raise, and Raise On Click. This prevents a very annoying behavior where windows that are larger than the screen will randomly jump around when you click anywhere within them.
* Under Window Settings/Move Window, turn off Constrain Y. This will enable you to move a window (using Alt+Button1) above the top of the screen.
* You will need a "window decorator" and if you don't use emerald, you will miss out on a lot of what this is all about so, beneath the “Effects” heading, click Window Decoration. In the Command input field, enter the window decorator you prefer - "emerald" .
* Plugins
* Disable Effects/Animations and Effects/Minimize Effect entirely, as they are just too slow on the eee. (luiz.fernando: try them, on my eee they work very fine, the minimize effect is included in Animations, I recommend you use just Animations)
* Enable (or leave enabled) the following plugins
* Enhanced Zoom Desktop
* Negative
* Desktop Cube
* Expo
* Rotate Cube
* Viewport Switcher
* Cube Reflection
* Window Decoration
* Wobbly Windows
* Cube Caps (Later you can click on Cube Caps and choose any images you want for the top and bottom of the cube.)
* **Optional** Cube Gears -- show's the "engine running inside the cube"
* and everything that was selected by default in Image Loading, Utility and Window Management.
* Click on "Desktop Cube" in the list under desktop, and if you have selected Cube Gears, choose the "Transparent Cube" tab, and set the opacity during rotation to about 40%.
* Because we have to move oversized windows around on the eee so much, the default behavior of Compiz to snap windows to the screen edge is very annoying. You'll want to turn it off. Click on "Wobbly Windows" and in the General tab unclick "Snap Inverted" (after you have Compiz running, you can come back here and mess with spring tension, friction, and other fun stuff.)
* Because it's cool, and really useful on the eee's small screen enable what the compiz people call "Display active windows" when moving the mouse pointer to the top right corner of the screen. This gives you a scroll of miniatures of all your active windows across the center of the screen for you to click on one to bring it to the top. Very useful if you have a bunch of windows open and the buttons at the bottom have gotten too small.
* Double-click Scale → Actions → General → Initiate Window Picker For All Windows and choose TopRight
* Transparent windows on the move. Go to the Move Window plugin and set Opacity to 80. Now the windows get 20% transparent every time you drag them. (Mess with this percentage until you like it.)
* **Cube Settings** Believe it or not, the cube works great on the eee.
* Click go to General Options (all the way at the top of the CCSM screen)
* Select the Desktop Size tab
* set Horizontal Virtual Size to 4, Vertical Virtual Size to 1, and Number of Desktops to 4. This allows you to see the desktop flip when you hit Ctrl/Alt/Left or Right, but you can't see the actual cube and the Initiate action (Ctrl/Alt/hold Button1) doesn't work. To get that to work,
* go back to the main CCSM screen and select click on Rotate Cube
* select the General tab and set Zoom to a non-zero number (1 works well). Now you will be able to hit Ctrl/Alt/hold button 1 on the mouse and see the cube, and move the mouse around to rotate it. Useless, but really cool. :-)
**Finally, done with setup*** close the CCSM and test your install.
==== Testing Run ====
From a terminal type
compiz --replace
==== Set to Auto Start ====
If everything is working to your satisfaction:
* go to Applications - Settings -Autostarted Applications in the XFCE menu
* add an item that starts "compiz --replace".
* Restart X (ctrl-alt-backspace)
Compiz should start automatically. It only adds a second or 2 to startup time, you'll barely notice it.
==== The more-difficult-but-better way ====
**Warning!** //This method isn't necessarly more reliable, if you notice symptoms such as compiz not starting and you only see your background without the ability to interact with your desktop when you've logged in, then starting by the method above is more recommended. --KhaaL //
So… You prefer the scary stuff? Well, it’s not that difficult, actually. You just press Alt+F2 and enter
gksudo "mousepad /etc/xdg/xfce4-session/xfce4-session.rc"
Basically, that opens the file xfce4-session.rc with root rights with the text editor mousepad.
In this file, all you have to do is replace:
Client0_Command=xfwm4
…with:
Client0_Command=compiz
(Thank Ubuntuforums user sisco311 for this one)
Do note that this makes Compiz default for all users, as opposed to the previous method which made it default just for you.
If your session doesn't start with compiz (ie you still have the usual xfwm4 instead), try disabling the user cache :
mv ~/.cache ~/.cache.old
Restart your session, and if it worked, delete the cache :
rm -fr ~/.cache.old
Otherwise the problem is elsewhere, and you may also delete the cache. If your want to restore it :
rm -fr ~/.cache && mv ~/.cache.old ~/.cache
**Note:** For the instructions above to work you might have to edit ~/.config/xfce4-session/xfce4-session.rc
This can be accomplished with:
nano ~/.config/xfce4-session/xfce4-session.rc
If the following parameters exist, edit them to:
SaveOnExit=false
AutoSave=false
then save the file and exit.
==== Add a simple switcher-application to switch between compiz and xfwm4 ====
By installing [[http://forlong.blogage.de/article/pages/Compiz-Switch|compiz-switch]] you will be able to switch between compiz and the xfwm4 engine. After downloading and installing the switch, a new button is found in the start-menu (Accessoires->Compiz-Switch) which will active compiz (if xfwm4 is running) or vice-versa.
==== Configure emerald ====
At this point you have only the default emerald windows decorator theme. To get more themes you will need to download and install the emerald themes package. From Applications - Settings - Emerald Theme Manager select the "Repositories" tab and press the buttons to fetch GPL'd themes and if you like to fetch the non-GPL'd themes. Then you can go to the themes tab and try various themes. These set the colors and transparancy of the windows borders, control the appearance of the maximize/minimize/close buttons, etc etc. Have fun!
If nothing happens when you click on the fetch buttons, then you need to aptitude install subversion then execute the command line displayed at the bottom of the emerald configuration window : svn ls https://svn.generation.no/emerald-themes
(choose to "accept permanently" the certificate), then you will be able to fetch'em ! --- //[[djakoni@gmail.com|Djakoni]] 2008/03/31 06:20//