![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Ubuntu Extra Shot
![]() Join Date: Apr 2005
Beans: 267
Dapper Drake Testing/
|
HOW TO: Run games on a new X server
I already covered this in an unrelated post in the gaming forum and the nuts and bolts of this are all probably in the linux-gamers.net how to, but I like to keep things local here
Basically the ideas behind this is you run can run your games like Doom 3, Quake, Enemy Territory and pretty much anything in a new X server. The main benifit of this is that your dektop will get backgrounded which should give the game a performance boost and the ability to switch between your fullscreen game and your desktop, for example to check on an irc message. I found this incredibly useful while clan gaming in the past as people would message me alot in irc while I played and otherwise I had to quit the game to see what it was. And now even though I don't play seriously any more I can't live without it. I will be using Enemy Territory as the example as it's my favorite game "Enough already, show me the stuff" I hear you say, well ok then here you go: 1. First to allow you to run a new X display you need to edit the "/etc/X11/Xwrapper.config" file: Code:
sudo cp /etc/X11/Xwrapper.config /etc/X11/Xwrapper.config.custom sudo su md5sum /etc/X11/Xwrapper.config > /var/lib/xfree86/Xwrapper.config.md5sum exit sudo dpkg-reconfigure xserver-common 2. Next we have to set your ~/.Xauthority file up. This may look tricky but it's very straight forward, all you need to do is add a line using a special key we find. So, in a terminal type: Code:
xauth list Code:
ananke/unix:0 MIT-MAGIC-COOKIE-1 9fde426e5g03b20f4b7e51cb329d3033 localhost.localdomain/unix:0 MIT-MAGIC-COOKIE-1 9fde426e5g03b20f4b7e51cb329d3033 Code:
add :1.0 MIT-MAGIC-COOKIE-1 9fde426e5g03b20f4b7e51cb329d3033 exit 3. Create the script "x.et": Code:
gedit x.et Code:
#!/bin/bash xinit /usr/local/games/enemy-territory/et $* -- :1 4. Now we need to make it executable and move it to the right place: Code:
chmod a+x ./x.et sudo cp ./x.et /usr/local/bin 5. Run "x.et" in a terminal, ET should run on a new X server. To access your desktop you need to press: Code:
CTRL + ALT + F7 6. To go back to ET by pressing: Code:
CTRL + ALT + F8 That's it! Another great benefit to this is that with the "x.et" script you don't even need to be running your desktop to play a game. Meaning if you boot up to "run level 3" or you quit gnome and gdm to get to a command prompt you can run "x.et" and it will still work saving even more resources! Extra notes: If like me you use an ~/.Xmodmap file to amend your mouse buttons (I have a Logitech mx510) then you need to add that like to the script aswell so that X server is configured properly like this example of my script: Code:
#!/bin/bash xmodmap -display :1 -e "pointer = 1 2 3 6 7 8 9 10 4 5" & xinit /usr/local/games/enemy-territory/et $* -- :1 If you use the fabulous XQF then you can change the command to run "x.et" instead of just "et", that's a real winning combination! Last but not least, it's a good idea to turn screensavers off so they don't load on your idle desktop while you're playing and suck up resources. It's probably a good idea to have the "Blank Screen Only" set which shouldn't affect performance. Hope you like it Last edited by endy; August 16th, 2005 at 07:44 AM.. |
|
|
|
|
|
#2 | |
|
Just Give Me the Beans!
![]() Join Date: Jun 2005
Beans: 50
|
Re: HOW TO: Run games on a new X server
Quote:
Also sudo md5sum /etc/X11/Xwrapper.config > /var/lib/xfree86/Xwrapper.config.md5sum <- that line gave me permission denied on the part after >... =) Anyway, great guide, will be glad to use it when I make it work. |
|
|
|
|
|
|
#3 |
|
Ubuntu Extra Shot
![]() Join Date: Apr 2005
Beans: 267
Dapper Drake Testing/
|
Re: HOW TO: Run games on a new X server
Ok I did miss a whole part out.
*bangs head on desk * Sorry about that, I've amended the how to and I hope it should work now. The bit about the xauth is kinda hard to explain, I've done my best but if you have any questions I'll do my best to clear it up. But if it all goes wrong on the xauth bit just type "quit" instead of "exit" and no changes will be saved. Hope this does the trick this time Last edited by endy; July 24th, 2005 at 09:34 AM.. |
|
|
|
|
|
#4 | |
|
Just Give Me the Beans!
![]() Join Date: Jun 2005
Beans: 50
|
Re: HOW TO: Run games on a new X server
Quote:
Thanks for a great guide, been looking for this a long time. |
|
|
|
|
|
|
#5 |
|
Just Give Me the Beans!
![]() Join Date: Jul 2005
Beans: 43
|
Re: HOW TO: Run games on a new X server
This worked perfectly for my copy of Doom 3, I can now edit config files in gedit and switch back to Doom 3 and execute them. Incredibly slick!
Thank you very much endy - you just made gaming in Ubuntu a far more pleasant experience for me! |
|
|
|
|
|
#6 | |
|
Ubuntu Extra Shot
![]() Join Date: Apr 2005
Beans: 267
Dapper Drake Testing/
|
Re: HOW TO: Run games on a new X server
Quote:
Code:
x.et +set r_fullscreen 0 Code:
et +set r_fullscreen 0 |
|
|
|
|
|
|
#7 |
|
5 Cups of Ubuntu
![]() Join Date: May 2005
Beans: 24
|
Re: HOW TO: Run games on a new X server
This is a great howto. I am having a problem tho. I can start it fine but then if i switch back to my desktop and then back to the game (CTRL ALT F6) all I see is the terminal output. I cannot acccess the game. It is still running because I can hear the music but I cannot get into the game.
Any ideas? BTW im playing with Unreal Tournament 2004 edit: oops, never mind. I realized that the new X server is started on F8 and i thought it wud be on F6 because that is where i ran the command. Last edited by ishtvan222; August 6th, 2005 at 02:31 PM.. |
|
|
|
|
|
#8 |
|
A Carafe of Ubuntu
![]() Join Date: Jan 2005
Location: Lawernce, Mass, USA
Beans: 78
|
Re: HOW TO: Run games on a new X server
This seems very interesting.
I just wanted to know how would this increase performance? I would think running another X server would use up more ram. If thats not the case then awesome. ![]() |
|
|
|
|
|
#9 |
|
5 Cups of Ubuntu
![]() Join Date: May 2005
Location: Finland
Beans: 39
Ubuntu 7.10 Gutsy Gibbon
|
Re: HOW TO: Run games on a new X server
Nice guide. I use this script:
Code:
#!/bin/bash xinit $* -- :1 > /dev/null |
|
|
|
|
|
#10 |
|
5 Cups of Ubuntu
![]() Join Date: Jul 2005
Beans: 42
|
Re: HOW TO: Run games on a new X server
Hi. I did everything you mentioned exactly the same (the only difference is that I named the file x.armyops). Got a unusual greyish background with an "x" mouse cursor and a (correct) armyops splash image. Normally it's a black background. Then (in the console) I saw it was terminated due to an error. Here's the full output:
Code:
muszek@muszek:~$ x.armyops
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/muszek:1
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
X Window System Version 6.8.2 (Ubuntu 6.8.2-10 20050405154308 root@terranova.war thogs.hbd.com)
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.6.10 i686 [ELF]
Current Operating System: Linux muszek 2.6.10-5-k7 #1 Fri Jun 24 18:51:20 UTC 20 05 i686
Build Date: 05 April 2005
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.6.10-5-k7 (buildd@vernadsky) (gcc version 3.3.5 (Debi an 1:3.3.5-8ubuntu2)) #1 Fri Jun 24 18:51:20 UTC 2005 T
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Thu Aug 11 18:51:13 2005
(==) Using config file: "/etc/X11/xorg.conf"
Skipping "/usr/X11R6/lib/modules/extensions/libGLcore.a:m_debug_clip.o": No sym bols found
Skipping "/usr/X11R6/lib/modules/extensions/libGLcore.a:m_debug_norm.o": No sym bols found
Skipping "/usr/X11R6/lib/modules/extensions/libGLcore.a:m_debug_xform.o": No sy mbols found
(WW) fglrx: No matching Device section for instance (BusID PCI:3:0:1) found
Skipping "/usr/X11R6/lib/modules/libfb.a:fbmmx.o": No symbols found
(EE) fglrx(0): Failed to initialize UMM driver.
Warning: font renderer for ".pcf" already registered at priority 0
Warning: font renderer for ".pcf.Z" already registered at priority 0
Warning: font renderer for ".pcf.gz" already registered at priority 0
Warning: font renderer for ".snf" already registered at priority 0
Warning: font renderer for ".snf.Z" already registered at priority 0
Warning: font renderer for ".snf.gz" already registered at priority 0
Warning: font renderer for ".bdf" already registered at priority 0
Warning: font renderer for ".bdf.Z" already registered at priority 0
Warning: font renderer for ".bdf.gz" already registered at priority 0
Warning: font renderer for ".pmf" already registered at priority 0
Could not init font path element unix/:7100, removing from list!
Couldn't set video mode: Couldn't find matching GLX visual
History:
Exiting due to error
waiting for X server to shut down
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|