you have something like
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<games>
Long list of games
</games>
add
Code: Select all
<game id="4920" name="Defcon" />
into the list of games, but before </games>
Create (or edit) a file called ~/.gaim/gfire_launch.xml
and put this in it:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<launchinfo>
<game id="4920" name="Defcon">
<xqf name="Defcon" />
<command>
<bin>/home/cappy/defcon-v1.42/defcon</bin>
<dir>/home/cappy/defcon-v1.42</dir>
<connect>+connect @ip@:@port@</connect>
<launch>@options@ @gamemod@ @connect@</launch>
</command>
</game>
</launchinfo>
and edit the <bin> and <dir> for your path to the game.
If you have a pre-existing gfire_launch.xml take off the line that has
Code: Select all
<!-- <options>-w -x --use-window</options> -->
or else none of this will work.
Goto (Accounts)--> (Xfire) --> And reload both your Launch Config and Game ID List
(I'm not sure if you can join games through xfire using this. I don't know the syntax for the defcon launch.)
I added this to my launcher that starts Defcon in another X session:
Code: Select all
#!/bin/sh
#uncomment if launching from console session
#sudo /etc/init.d/gdm stop
#KDE use this instead
#sudo /etc/init.d/kdm stop
# Launches a new X session on display 3. If you don't have an Nvidia card
# take out the "& nvidia-settings --load-config-only" part
sudo X :3 -ac & nvidia-settings --load-config-only
# Goto game dir (modify as needed)
cd "/home/cappy/defcon-v1.42" #Modify
# Forces the system to have a break for 2 seconds, X doesn't launch instantly
sleep 2
#Set Xfire ingame
cp ~/.gaim/defcon.ingame.tmp ~/.gaim/ingame.tmp
# Launches game (modify as needed)
DISPLAY=:3 "/home/cappy/defcon-v1.42/defcon" #Modify
while true
do
if [ -z "`ps aux | grep "defcon.bin.x86" | grep -v grep`" ] ; then
rm ~/.gaim/ingame.tmp
exit
fi
sleep 5
done
And the same script without the X launcher:
Code: Select all
cp ~/.gaim/defcon.ingame.tmp ~/.gaim/ingame.tmp
# Launches game (modify as needed)
"/home/cappy/defcon-v1.42/defcon"
while true
do
if [ -z "`ps aux | grep "defcon.bin.x86" | grep -v grep`" ] ; then
rm ~/.gaim/ingame.tmp
exit
fi
sleep 5
done
The script will set you in-game until you end defcon.
I would recommend running the script as a regular user and not use "sudo sh scriptname.sh" (so you don't lose your user settings mainly). Also, defcon.ingame.tmp will need to be created with
Code: Select all
GameType Defcon
If you DO run the script as root replace any line with "~/" with "/home/username/" instead.