WineHQ
Wine Forums

Board index » WineHQ » Wine Help




 Page 1 of 1 [ 11 posts ] 



 
Author Message
 Post Posted: Thu Feb 10, 2011 3:50 pm 
Offline
Level 4
Level 4

Joined: Mon Jun 29, 2009 7:12 pm
Posts: 122
Run Game In Separate X Server?

Hi,

I posted before about STEAM games
not working too well with current Wine.

I've done some more research
and I think I found a good solution
but do not know how to implement it.

I'm on Ubuntu 10.10 64bit Linux
using current Wine 1.3.13 32bit
with an nVidia graphic card(GTS 450)
and current proprietary display drivers installed.

How would I run a STEAM game in a separate X Server?
I think doing this would solve my problems.

Any help would be appreciated.
Thanks!

Jesse


Top 
 Post Posted: Thu Feb 10, 2011 9:05 pm 
Offline
Moderator
Moderator

Joined: Sat Feb 23, 2008 2:29 pm
Posts: 6605
JeZ-l-Lee wrote:
Run Game In Separate X Server?

Start X for a separate display then run games there. The simplest way to do both at the same time is:
Code:
xinit /usr/bin/wine game.exe -- :1


Top 
 Post Posted: Sun Jun 05, 2011 11:27 pm 
Offline
Newbie
Newbie

Joined: Sun Jun 05, 2011 11:23 pm
Posts: 1
vitamin wrote:
JeZ-l-Lee wrote:
Run Game In Separate X Server?

Start X for a separate display then run games there. The simplest way to do both at the same time is:
Code:
xinit /usr/bin/wine game.exe -- :1
thats great ty...but where do u put the code in the terminal? geting sick of all linux forums being so rtfm I WOULD GLADLY READ THE MANUAL IF SOME 1 COULD POINT ME TO IT.in the mean time ill just sick this code where the sun dont shine :x


Top 
 Post Posted: Mon Jun 06, 2011 6:52 am 
Offline
Moderator
Moderator

Joined: Wed Apr 27, 2011 11:01 pm
Posts: 1153
On 6/5/11 9:27 PM, drunk_sob wrote:
Quote:
vitamin wrote:
Quote:
JeZ-l-Lee wrote:
Quote:
Run Game In Separate X Server?
Start X for a separate display then run games there. The simplest way to do both at the same time is:

Code:
xinit /usr/bin/wine game.exe -- :1


thats great ty...but where do u put the code in the terminal? geting sick of all linux forums being so rtfm I WOULD GLADLY READ THE MANUAL IF SOME 1 COULD POINT ME TO IT.in the mean time ill just sick this code where the sun dont shine :x

Linux does come with a whole bunch of manuals. If you are told "Go read
the manuals" that is because you really should. Forum support is mostly
volunteer and folks do have other things to do. Take time to read
through what you are being told. Also, learn to use the copy + paste
function. That is what you are being told. Not everything can nor
should be done through a GUI.

James McKenzie


Top 
 Post subject:
 Post Posted: Thu Jul 21, 2011 2:58 pm 
Offline
Newbie
Newbie

Joined: Thu Jul 21, 2011 2:48 pm
Posts: 4
The solution provided does not work for me. I use a patched wine-1.3.18 (WinePulse).

I try to run Call of Duty 4 in a separate xserver. Running games in a separate xserver works great for native Linux games, but I can't get it to work for a game that needs to start with Wine.

For example, if I run:
Code:
xinit /usr/bin/env WINEPREFIX="/home/serrano/.wine" /usr/bin/wine "/home/serrano/.wine/drive_c/Program Files/Activision/Call of Duty 4 - Modern Warfare/iw3sp.exe" -- :1

or
Code:
xinit /usr/bin/wine "/home/serrano/.wine/drive_c/Program Files/Activision/Call of Duty 4 - Modern Warfare/iw3sp.exe" -- :1

The screen switches to a new xserver, and in that xserver I'm presented with a graphical error message:
Quote:
WIN_IMPROPER_QUIT_BODY
[Yes] [No] [Cancel]


If I answer Yes or No, it gives me the following error,
Quote:
Error during initialization:
Couldn't load fileSysCheck.cnf. Make sure Call of Duty is run from the correct folder.
[OK]


Anyone know how to fix this?


Top 
 Post subject:
 Post Posted: Thu Jul 21, 2011 6:03 pm 
Offline
Level 4
Level 4

Joined: Wed Mar 18, 2009 3:10 pm
Posts: 138
I assume you use nvidia, it opens it in :2
change :2 to something else if you want it somewhere else,
or heck make it even a command line option

Code:
#!/bin/sh
# cd to dir && run in wine in another X Display

if [ ! "$1" ]; then
   echo "Usage : xwine [gameDir] [exe]"
   exit
fi
if [ ! "$2" ]; then
   echo "Usage : xwine [gameDir] [exe]"
   exit
fi

X :2 -ac -terminate & nvidia-settings --load-config-only
sleep 10
DISPLAY=:2
cd "$1"
wine "$2" $3


1. create new file, name it xwine
2. copy that to that file
3. chmod +x
4. sudo mv xwine /usr/bin/
5. xwine "/path/to/game/dir" "executable"

Not tested, but should work.


Top 
 Post subject:
 Post Posted: Fri Jul 22, 2011 3:26 am 
Offline
Newbie
Newbie

Joined: Thu Jul 21, 2011 2:48 pm
Posts: 4
Cloudef,

Thanks, it works! I use NVIDIA indeed. It seems the key lies in moving to the game directory first (weird, I'm pretty sure I already tested this). The following works as well,
Code:
cd ~/.wine/drive_c/Program\ Files/Activision/Call\ of\ Duty\ 4\ -\ Modern\ Warfare/
xinit /usr/bin/wine iw3sp.exe -- :1


I'm wondering what the options -ac and -terminate mean. I can't find them in the man page for X.

There's still on problem though. When the game runs in the separate X server, I don't hear any sound. I do hear the sound when I switch back to the desktop (Ctrl+Alt+F7) while the game is running, so sound is working. This might have something to do with the patched Wine version I use which uses PulseAudio. Is there a way to get sound working in the separate X server as well?


Top 
 Post subject:
 Post Posted: Fri Jul 22, 2011 4:48 am 
Offline
Level 4
Level 4

Joined: Wed Mar 18, 2009 3:10 pm
Posts: 138
-terminate switch terminates the X Display when there are no applications running anymore. I don't remember what -ac does anymore but it's in man page.

About the sound issue. You are probably using distro that has sound configured wrongly, or it's pulse audio issue. I'm using Arch Linux and Alsa, and stuff works fine.

eg. In old linux mint I once had, you have to be root to play any sound when switching to TTY terminal, which is bad.


Top 
 Post subject:
 Post Posted: Fri Jul 22, 2011 3:06 pm 
Offline
Newbie
Newbie

Joined: Thu Jul 21, 2011 2:48 pm
Posts: 4
I don't think it's a distro (Ubuntu) problem because I don't have this sound problem with non-wine stuff. I can launch any native Linux game and even XBMC in a separate xserver and switch xservers or terminal (logged in as regular user) without losing the sound. Good chance this is a WinePulse problem. In that case I should wait until the new audio system for Wine is finished - hopefully that's not a long wait - I really miss the sniping...


Top 
 Post subject:
 Post Posted: Fri Jul 22, 2011 3:32 pm 
Offline
Newbie
Newbie

Joined: Thu Jul 21, 2011 2:48 pm
Posts: 4
I found the solution to the PulseAudio + separate xserver sound issue! Google is again my best friend. I found the solution here.

One needs to execute wine with 'ck-launch-session' which was already installed on my Ubuntu machine (I have no idea what it's for; there's no man page and I don't know what package it's from). So the command for running a WinePulse game in a separate xserver:

Code:
cd ~/.wine/drive_c/Program\ Files/Activision/Call\ of\ Duty\ 4\ -\ Modern\ Warfare/
xinit /usr/bin/ck-launch-session /usr/bin/wine iw3sp.exe -- :1


Sound should work fine now, even when switching xservers. :D


Top 
 Post subject:
 Post Posted: Fri Jul 22, 2011 6:04 pm 
Offline
Level 4
Level 4

Joined: Wed Mar 18, 2009 3:10 pm
Posts: 138
ck-launch-session is part of consolekit, (and maybe policykit) Maybe it's used to grant permissions for sound or something. But most likely sounds that ubuntu is configured that way.


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 11 posts ] 




Board index » WineHQ » Wine Help


Who is online

Users browsing this forum: No registered users and 16 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: