How to play openGL based games with full 3D acceleration on XGL/compiz
link
之前在使用 Beryl 時,我的 Return to Castle Wolfenstein:Enemy Territory (RTCW:ET) 沒有辦法正常的使用在 Beryl 中,甚至連移除了之後還是沒有辦法正常執行游戲,後來在 Google 中找到可能可以解決的方法(我還沒試過XD),以下是可能可以解決的方法:
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:
Code:
and add the following to the end of the file:
where user_name is the group to which your user_name belongs (generally they go by the same name on a default Dapper install)
press ctrl-X and hit "Y" to save and exit.
now do the following:
and paste the following:
save and exit and do the following:
and paste the following:
save and exit.
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"
Now do the folllowing:
Now you are all set.
To run any openGL based game, play it as follows:
and enjoy full 3D acceleration!
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.
之前在使用 Beryl 時,我的 Return to Castle Wolfenstein:Enemy Territory (RTCW:ET) 沒有辦法正常的使用在 Beryl 中,甚至連移除了之後還是沒有辦法正常執行游戲,後來在 Google 中找到可能可以解決的方法(我還沒試過XD),以下是可能可以解決的方法:
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:
Code:
sudo visudo
and add the following to the end of the file:
%user_name ALL=NOPASSWD: /usr/bin/Xorgallowlocal
where user_name is the group to which your user_name belongs (generally they go by the same name on a default Dapper install)
press ctrl-X and hit "Y" to save and exit.
now do the following:
sudo gedit /usr/bin/Xorgallowlocal
and paste the following:
#!/bin/sh
DISPLAY="$2" XAUTHORITY="$1" xhost local:
save and exit and do the following:
sudo gedit /usr/bin/nonXgl
and paste the following:
#!/bin/sh
DISPLAY=":93"
if [ -z "$1" ]; then
echo "Usage: nonXgl"
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 $@
save and exit.
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:
ps uax | grep Xorg | grep Xgl
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"
Now do the folllowing:
sudo chmod 755 /usr/bin/nonXgl
sudo chmod 755 /usr/bin/Xorgallowlocal
Now you are all set.
To run any openGL based game, play it as follows:
nonXgl (game)
and enjoy full 3D acceleration!
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.
0 意見:
張貼意見