Re-enabling "Genie Effect" using "Magic Lamp"

picture taken from http://dengpeng.name/blog/index.php?s=%E5%B7%A6%E5%8F%B3


I know some of the guys like me who uses Magic Lamp effect of Compiz appreciate MacOSX’s “genie effect” very much. To some extent, I can say that Magic Lamp is born to imitate this visual eye-candy. But you may find out that in recent Compiz versions, the lowest possible value of the parameter minimum waves of Magic Lamp effect that can be altered in the Compiz Config Setting Manager is limited to 3 which, formerly zero, becomes an obstacle for us to tweak this effect more like the one in MacOSX.

Reason for this is that Apple has already received the patent for the genie effect, therefore the developers of Beryl, with the intention to make Beryl a legal software, have to set such a constraint in order not to infringe Apple’s patent by giving users ability to generate the “same” effect. Some one has come with a solution to re-enable it by downloading source code, recompiling, risking breaking dependencies and such.

But there is a better/quicker way:
What you need: A Hex editor, I use ghex2.
You can install it using:
sudo apt-get install ghex

* You have to be root to modify the following files:

1. Use Hex editor (I used ghex) to open “/usr/lib/compiz/libanimation.so”

# sudo ghex2 /usr/lib/compiz/libanimation.so

2. Find “magic_lamp_max_waves”, look for following “3”, change “3″ to “0″

3. Save, Close

4. Use Text Editor to open “/usr/share/compiz/animation.xml”

# sudo gedit /usr/share/compiz/animation.xml

5. Find “magic_lamp_max_waves”, look for following “3”, change “3″ to “0″

6. Save, Close

7. Restart GDM if the 3D desktop is currently running otherwise start compiz

8. Set Minimization effect to “Magic Lamp”, change Max Waves to “0″

(install ccsm if you dont have this tool)
# sudo apt-get install compizconfig-settings-manager

(start ccsm)
# ccsm

8. Use magic lamp as your minimize effect

Thanks Funkyrider! This info was taken from http://ubuntuforums.org/showthread.php?t=557491
and thanks to e.a.s.e. http://dengpeng.name/blog/2007/05/09/magic-lamp-vs-genie-effect/

2 comentarios:

Anonymous said...

HELP! my graphics card (intel GM965) is blacklistes and i set it to whitelist added then i added the beta drivers ppa to my softwre sources so yeah BUT!!!, it worked fine then i did this and when i saved the hex file my screen flashed and compiz stopped so i said oh ill just turn them back on once i edit the xml file, i finished this and now OpenGL doesnt work!! even if i whitelist it it says "extra" effects are on but no wobbly windows no magic lamps!!

TechnoBluez said...

I have to ask, have you tried restarting the computer?
I you believe it's the hex edit, then just reinstall compiz with:
sudo aptitude reinstall compiz
That should give you the original compiz binary back. You could also remove and reinstall compiz entirely.
Anyway this should probably not be related to the fix for max_waves.
If you believe direct rendering if disabled try:
glxinfo |grep direct
and see what the output is. Your problem might be there.