Results 1 to 4 of 4

Thread: Project: Dedicated Game Launchers

  1. #1
    Join Date
    Jan 2005
    Location
    Brookline, MA
    Beans
    1,059
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Project: Dedicated Game Launchers

    Ok, now I need some real guru help.

    When I get down to a gaming session, I really don't need a desktop at all. I would like to be able to logout (or reboot), login to console, and be able to run a dedicated X server for the games that I play.

    I saw this script here on the help wiki for World of Warcraft which looks like a step in the right direction:

    #!/bin/sh

    X :3 -ac & # Launches a new X session on display 3
    cd "~/.wine/drive_c/Program Files/World of Warcraft" # Goto WoW dir
    sleep 2 # Forces the system to have a break for 2 seconds
    DISPLAY=:3 /usr/X11R6/bin/wine WoW.exe -opengl # Launches WoW
    So here comes the questions!

    X :3 -ac & # Launches a new X session on display 3
    This launches a new X session for any game. Not sure what the -ac flag means, but that looks to be the gist of it. Can you change the X: 3 to any display? Say X: 1?

    cd "~/.wine/drive_c/Program Files/World of Warcraft" # Goto WoW dir
    Whichever game you are loading with this script, you point this like to the install directory. So you could do this with Crossover or Cedega?

    sleep 2 # Forces the system to have a break for 2 seconds
    This is self explanatory, but why do you need to force a system sleep?

    DISPLAY=:3 /usr/X11R6/bin/wine WoW.exe -opengl # Launches WoW
    I don't get why the line above points to the install directory, but the last like points to /usr.

    Shouldn't the line read: Display=1-6) ~/.wine/drive_c/Program Files/World of Warcraft?

    And how do I allow a login to terminal/console?

    Thanks for the assist!

  2. #2
    Join Date
    Aug 2006
    Location
    tuesday
    Beans
    6,502
    Distro
    Kubuntu Development Release

    Re: Project: Dedicated Game Launchers

    Quote Originally Posted by justin whitaker View Post
    This launches a new X session for any game. Not sure what the -ac flag means, but that looks to be the gist of it. Can you change the X: 3 to any display? Say X: 1?
    Easy enough to explain:

    Code:
    [hikaricore@key:~ (699.8 Mb)]$ sudo X --help
    Unrecognized option: --help
    use: X [:<display>] [option]
    -a #                   mouse acceleration (pixels)
    -ac                    disable access control restrictions
    As for the display, yes you could change it to any you wanted.

    Quote Originally Posted by justin whitaker View Post
    Whichever game you are loading with this script, you point this like to the install directory. So you could do this with Crossover or Cedega?
    There isn't any need to do this with cedega as it has a GUI front end. I guess you could, but if you're using cedega it kinda defeats the point.

    Quote Originally Posted by justin whitaker View Post
    This is self explanatory, but why do you need to force a system sleep?
    Gives X a chance to start before launching an application. This process is not instant.

    Quote Originally Posted by justin whitaker View Post
    I don't get why the line above points to the install directory, but the last like points to /usr.
    The game needs to be run from it's install directory, the last line is pointing to the location of the wine binary. This isn't really nessicary in most cases, as you can just use:

    DISPLAY=:3 wine WoW.exe -opengl # Launches WoW


    Quote Originally Posted by justin whitaker View Post
    Shouldn't the line read: Display=1-6) ~/.wine/drive_c/Program Files/World of Warcraft?
    No.

    Quote Originally Posted by justin whitaker View Post
    And how do I allow a login to terminal/console?
    Hit ctrl+alt+f1. This brings you to a console. Login here and for best results, shutdown your other X gui session(s).

    Code:
    sudo /etc/init.d/gdm stop
    or if you use kubuntu:

    Code:
    sudo /etc/init.d/kdm stop
    I've found this greatly improves gaming as nearly nothing else but system services will be running.

    Then run your launcher and you're good to go.

    After you're done gaming, hit ctrl+alt+backspace to close your open X session and restart gdm or kdm as such:

    Code:
    sudo /etc/init.d/gdm start
    or:

    Code:
    sudo /etc/init.d/kdm start

  3. #3
    Join Date
    Jan 2005
    Location
    Brookline, MA
    Beans
    1,059
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Project: Dedicated Game Launchers

    hikaricore, thanks a bunch!

    As for Cedega/Crossover, you can run both from command line, so you can probably get the same performance increase without loading the GUI (substitute cxoffice/cedega for wine).

    So if I am using Crossover, I need to point to where Crossover is installed in the last line, right?

  4. #4
    Join Date
    Jun 2006
    Beans
    5
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Project: Dedicated Game Launchers

    I've been using the same (modified) script to launch dedicated X sessions for games for awhile. The performance boost is pretty great but I have a couple problems:

    1) I can't seem to take system resources from a new session once it's been declared with out crashing the new session. Eg, I launch a game on a dedicated session, switch back to the gnome session loaded on startup and open firefox and the new session crashes to grey. If I open firefox before launching the new session, everything is fine and I can use both simlutaneously (with a fps hit in the game, of course).

    2) I can't seem to start 2 sessions with a client on each. If I launch the 1st new session with the client and then try to launch a new session with

    Code:
    X :3 -ac &   # Launches a new X session on display 3 
    nvidia-settings --load-config-only
    sleep 2   # Forces the system to have a break for 2 seconds
    DISPLAY=:3 clientcommand &  # Launches client on 3
    sleep 2
    X :2 -ac &   # Launches a new X session on display 2
    I get an AGP access error and the launch fails. I can launch both new sessions first with

    Code:
    X :2 -ac &   # Launches a new X session on display 2 
    nvidia-settings --load-config-only
    sleep 2   # Forces the system to have a break for 2 seconds
    X :3 -ac &   # Launches a new X session on display 3 
    nvidia-settings --load-config-only
    but then assigning a client to x display (2 or 3) with

    Code:
    DISPLAY=:x clientcommand
    doesnt' seem to have any effect.

    I've tried doing these commands at a terminal one at a time and at no point do I get errors and at no point do I get a client on either display.

    Does anyone have any thoughts about either of these two problems?
    Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •