FULL credit goes to "jesper" from the compiz forums ( http://compiz.net ) for the following work. I have tested it and it works and hence warrants a complete howto here.
The original howto is here
CAVEAT:
1) I have only tested this on GNOME.
2) lithorus has reported that this does not work with the fglrx (ATI) driver. Trying the below with the same will result in an XGL crash.
First of all, do the following:
and add the following to the end of the file:Code:sudo visudo
where user_name is the group to which your user_name belongs (generally they go by the same name on a default Dapper install)%user_name ALL=NOPASSWD: /usr/bin/Xorgallowlocal
press ctrl-X and hit "Y" to save and exit.
now do the following:
and paste the following:Code:sudo gedit /usr/bin/Xorgallowlocal
save and exit and do the following:#!/bin/sh
DISPLAY="$2" XAUTHORITY="$1" xhost local:
and paste the following:Code:sudo gedit /usr/bin/nonXgl
save and exit.#!/bin/sh
DISPLAY=":93"
if [ -z "$1" ]; then
echo "Usage: nonXgl <command>"
exit 1
fi
isdisplay=0; isauth=0; for test in $(ps ax | grep "$DISPLAY" | grep Xorg ); do if [ $isauth -eq 1 ]; then export XAUTHORITY="$test"; isauth=0; fi; if [ "$test" = "-auth" ]; then isauth=1; fi; done;
sudo /usr/bin/Xorgallowlocal "$XAUTHORITY" "$DISPLAY"
exec $@
IN the above one thing needs to be kept in mind. you need to be sure that your display number is indeed "93" (by default it is 93 on almost all systems). To double check however, do the following:
and look at the end of the line just before "terminate". There you will see your screen number. If it is anything other than 93, change the value of DISPLAY accordingly in "/usr/bin/nonXgl"Code:ps uax | grep Xorg | grep Xgl
Now do the folllowing:
Now you are all set.Code:sudo chmod 755 /usr/bin/nonXgl sudo chmod 755 /usr/bin/Xorgallowlocal
To run any openGL based game, play it as follows:
for example:Code:nonXgl <game>
and enjoy full 3D acceleration!Code:nonXgl ppracer
If it works for you, you can go a step further and change the path of the game executable in your menu by using alacarte or some other way to be able to launch it from menu.
We can get this thread stickied if it works for others.
Bookmarks