Personal tools
You are here: Home GNU / Linux Ubuntu Feisty Fawn Software for Ubuntu Feisty Fawn Xgame on Ubuntu Feisty Fawn
Document Actions
  • Send this page to somebody
  • Print this page
  • Add Bookmarklet

Xgame on Ubuntu Feisty Fawn

by Pierre-Yves Landuré last modified 2007-08-07 11:52

Xgame is a script that allow to run games in a X configuration different of the one you use for your desktop. On my own, i use it to switch between my 4 screen desktop and my 1 screen gaming configuration on a SLI of GeForce 8800 GTX :D This work great and allow you to take full advantage of your GPUs.

Installation and Setup

We first allow our account to lauch a X session :

sudo sed -i -e "s/\(allowed_users=\).*/\1anybody/" \
/etc/X11/Xwrapper.config

We configure Xauth to see the second X session:

echo "list" | xauth | grep localhost | sed -e "s/.*[ \t]\(.*\)$/add :1.0 MIT-MAGIC-COOKIE-1 \1/" > /tmp/xauth.mine
cat /tmp/xauth.mine | xauth

We copy our usual X configuration file :

sudo cp /etc/X11/xorg.conf /etc/X11/xorg_games.conf

You can now edit it to fit your gaming needs :

sudo gedit /etc/X11/xorg_games.conf

Then, download Xgame and set its executable bit :

# GUI version install
wget --output-document=/tmp/xgame-gtk2 http://www.xs4all.nl/~masterpe/Perl/xgame-gtk2
sudo cp /tmp/xgame-gtk2 /usr/bin/xgame-gtk2
sudo chmod +x /usr/bin/xgame-gtk2

# Shell version install
wget --output-document=/tmp/xgame http://www.xs4all.nl/~masterpe/Perl/xgame
sudo cp /tmp/xgame /usr/bin/xgame
sudo chmod +x /usr/bin/xgame

You can now lauch Xgame with this command line :

xgame-gtk2

Go into the setup, and set the "X config file" entry to xorg_games.conf. I've still some issues with Wine games, but it work well for most of them. Have a nice game ;D

An icon on the Desktop

Run the following command line to add a X-Game incon on your desktop :

echo "[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=xgame-gtk2
TryExec=
Icon=/usr/share/pixmaps/gnome-xterm.png
X-GNOME-DocPath=
Terminal=false
Name[fr_FR]=X-Game
GenericName[fr_FR]=
Comment[fr_FR]=
Name=X-Game
GenericName=
Comment=" > ~/Desktop/X-Game.desktop

Wine

Wine can not be used as-is with Xgame because it lauch a background process and then stop. You need to make Wine "persistent". In order to achieve this goal, we will use a script  that stop only at the wineserver process disappearance. Run the following command lines to create this script :

sudo sh -c "echo \"#\!/bin/bash
wine \\\"\\\$@\\\"

while [ -n \\\"\\\`ps ax | egrep -v grep | egrep wineserver | sed -e 's/[ ]*\(\d*\)[\t ]*?.*/\1/'\\\`\\\" ]; do
sleep 1s;
done\" \
> /usr/bin/p-wine"
sudo chmod +x /usr/bin/p-wine
You can now use your Windows games within Xgame if you replace wine by p-wine in your command lines. The behavior of the two scripts is the same, excluding the fact that p-wine stop only after you quit the game.

Sound Issues on intrepid

Posted by mikeym at 2009-01-21 18:05
It appears that on Intrepid you need to add a start up option to get sound. Try:

ck-launch-session

P.S.

Congratulations on the script!

BlogBang
Navigation
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards:

Wikio