Run Game In Separate X Server?
Run Game In Separate X Server?
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
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
Re: 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:JeZ-l-Lee wrote:Run Game In Separate X Server?
Code: Select all
xinit /usr/bin/wine game.exe -- :1
Re: Run Game In Separate X Server?
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 shinevitamin wrote:Start X for a separate display then run games there. The simplest way to do both at the same time is:JeZ-l-Lee wrote:Run Game In Separate X Server?Code: Select all
xinit /usr/bin/wine game.exe -- :1

-
- Moderator
- Posts: 1153
- Joined: Wed Apr 27, 2011 11:01 pm
Run Game In Separate X Server?
On 6/5/11 9:27 PM, drunk_sob wrote:
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
Linux does come with a whole bunch of manuals. If you are told "Go readvitamin wrote: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 shineJeZ-l-Lee wrote:Start X for a separate display then run games there. The simplest way to do both at the same time is:Run Game In Separate X Server?
Code:
xinit /usr/bin/wine game.exe -- :1
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
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:
or
The screen switches to a new xserver, and in that xserver I'm presented with a graphical error message:
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: Select all
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
Code: Select all
xinit /usr/bin/wine "/home/serrano/.wine/drive_c/Program Files/Activision/Call of Duty 4 - Modern Warfare/iw3sp.exe" -- :1
If I answer Yes or No, it gives me the following error,WIN_IMPROPER_QUIT_BODY
[Yes] [No] [Cancel]
Anyone know how to fix this?Error during initialization:
Couldn't load fileSysCheck.cnf. Make sure Call of Duty is run from the correct folder.
[OK]
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
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.
change :2 to something else if you want it somewhere else,
or heck make it even a command line option
Code: Select all
#!/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
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.
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,
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?
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: Select all
cd ~/.wine/drive_c/Program\ Files/Activision/Call\ of\ Duty\ 4\ -\ Modern\ Warfare/
xinit /usr/bin/wine iw3sp.exe -- :1
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?
-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.
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.
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...
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:
Sound should work fine now, even when switching xservers. 
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: Select all
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
