When launching OpenGL applications games, google-earth etc you sometimes need to disable compiz. Most of you probably use fusion-icon or similar applications instead of enabling/disabling compiz via terminal.
Lets introduce you a very simple script I found (via google of course) to automatically disable compiz when launching your applications/games. It will also restore the compiz after exiting the application.
Create an empty file called “game” under /usr/bin/
To make the file copy+paste the following line in your terminal window:
sudo gedit /usr/bin/game
Copy and paste the following text into the file:
if ps -A | grep compiz > /dev/null ; then
echo "Warning: Compiz Detected!!!"
metacity --replace > /dev/null &
if $COMP ; then
echo "Warning: Starting Compiz!!!"
compiz --replace > /dev/null &
Then save and close the file.
To touch and make the file executable copy+paste the following line:
sudo touch /usr/bin/game && sudo chmod +x /usr/bin/game
Now you can just type game before before your application/game command.Example :
Most credits go to Amof from ubuntuforums.
202 total views, 4 views today