I often start games in a new X-Server. This is handy, because your desktop does not get affected at all whether your game changes the resolution of the screen, the gamma or anything else (especially annoying when it crashes and it keeps that). Additionally you can do something else while the game is loading (Counter-Strike: downloading a map takes ages!). Plus if you use Compiz Fusion, you will definitely have more FPS. Another good point is when you run wine apps and they crash, you can easily kill everything related with Ctrl+Alt+Backspace (if zap is activated).
I do this with two scripts, save them somewhere and give them executable rights (chmod +x file):
1. newx
#!/bin/bash
DISPLAY=:1.0
xinit $* -- :1
This one sets the display variable to 1:0 instead of 0:0, so all apps with a gui that are started from here will be on this X-Server.
2. gamespecificscript – example: thug2
cd „/mnt/ntfs/Games/Tony Hawk’s Underground 2/Game/“
wine THUG2.exe
This file contains just the commands to start the game. I like to add mumble-overlay and some nvidia releated environment variables like antialiasing here.
When you got all that set up, just start the game per terminal or make a desktop starter which starts this:
/path/newx /path/gamespecificscript
Now you can switch between both X-Servers with Ctrl+Alt+F7 (desktop) and Ctrl+Alt+F8 (game). Note that some games might need to display normal GUIs instead of just the game (Steam eg), so you should run a lightweight window manager like openbox in this case. Install it and add
openbox-session &
on the top of the gamespecific script.
Also if you use GDM, you might not be able to start a second X-Server. You can give yourself the rights you need, somehow. I already googled this once and found it, it isn’t too hard.
Note for SLiM users: X.org will execute your .xinitrc, where you propably have the command to start your desktop environment. It’s a good idea to just copy the file elsewhere and point SLiM there instead of the normal one (archlinux: /etc/slim.conf)





My old newx script broke on xorg 1.6. Thank you.