Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How can I play using Wine in another X display?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
Gotterdammerung
l33t
l33t


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Mon Dec 11, 2006 1:35 pm    Post subject: [SOLVED] How can I play using Wine in another X display? Reply with quote

Hi,

I have this game that when I stop playing, my desktop resolution is 640x480.
I believe playing in another X display may solve, but I don't remember how to do it, and I'm not finding it (I've STFW and TFA).

Thanks in advance.
:)
_________________
A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes


Last edited by Gotterdammerung on Thu Dec 14, 2006 10:03 am; edited 1 time in total
Back to top
View user's profile Send private message
phajdan.jr
Retired Dev
Retired Dev


Joined: 23 Mar 2006
Posts: 1777
Location: Poland

PostPosted: Mon Dec 11, 2006 5:14 pm    Post subject: Reply with quote

DISPLAY=":1" wine ...

Just substitute the display number (and make sure there is X server running there and permissions are set correctly using xhost).
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Mon Dec 11, 2006 7:26 pm    Post subject: Reply with quote

you may wana read the post about xlaunch (first link in my sig) there are examples using wine
_________________
The End of the Internet!
Back to top
View user's profile Send private message
Gotterdammerung
l33t
l33t


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Tue Dec 12, 2006 1:59 pm    Post subject: Reply with quote

_ph wrote:
DISPLAY=":1" wine ...

Just substitute the display number (and make sure there is X server running there and permissions are set correctly using xhost).


It's kind of working. The game is opening in the middle of the desktop, instead of occupying the whole desktop. And only a quarter of the desktop occupies the whole screen. How can I solve that?

This is what I am doing:

Code:
cd ~/game_directory
sudo X :1 -ac &
DISPLAY=":1" flwm &
DISPLAY=":1" wine jogo.exe -opengl &

_________________
A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes
Back to top
View user's profile Send private message
Gotterdammerung
l33t
l33t


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Tue Dec 12, 2006 2:02 pm    Post subject: Reply with quote

truc wrote:
you may wana read the post about xlaunch (first link in my sig) there are examples using wine


Thanks for the tip, but it is not working. xlaunch is asking for a launch.sh script, which I don't know where to find. :roll:
_________________
A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes
Back to top
View user's profile Send private message
phajdan.jr
Retired Dev
Retired Dev


Joined: 23 Mar 2006
Posts: 1777
Location: Poland

PostPosted: Tue Dec 12, 2006 2:05 pm    Post subject: Reply with quote

Gotterdammerung wrote:

It's kind of working. The game is opening in the middle of the desktop, instead of occupying the whole desktop. And only a quarter of the desktop occupies the whole screen. How can I solve that?

This is what I am doing:

Code:
cd ~/game_directory
sudo X :1 -ac &
DISPLAY=":1" flwm &
DISPLAY=":1" wine jogo.exe -opengl &


1. Does it work ok with some other programs (not wine)?
2. Is this flwm call neccessary? Try without it.
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Tue Dec 12, 2006 2:39 pm    Post subject: Reply with quote

Gotterdammerung wrote:
truc wrote:
you may wana read the post about xlaunch (first link in my sig) there are examples using wine


Thanks for the tip, but it is not working. xlaunch is asking for a launch.sh script, which I don't know where to find. :roll:


the link for the script and the instruction are given in the third part, and in the fourth part IV ) c) Differents settings for each app I show you how to use a different resolution on that display. (actually it seems you can now have only one config file, and play with the --layout option, But I have not experiment this yet ;) )
_________________
The End of the Internet!
Back to top
View user's profile Send private message
Gotterdammerung
l33t
l33t


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Thu Dec 14, 2006 9:58 am    Post subject: Reply with quote

I am using these two scripts to acomplish the task, and it is working quite well:

xmen2.sh:
Code:
#!/bin/sh

# Game parameters.
PROGRAM="c:/Arquivos de programas/Activision/X-Men Legends 2/Data/XMen2.exe -opengl"
SCREEN_RES="1024x768" # Must match screen identifier in XF86Config
SCREEN_BPP="24"      # Must be defined for screen in XF86Config
GAMMA="1.75"

~/winerun.sh "$PROGRAM" $SCREEN_RES $SCREEN_BPP $GAMMA


winerun.sh:
Code:
PROGRAM=$1
SCREEN_RES=$2
SCREEN_BPP=$3
GAMMA=$4

# Sensitivity works according to "xset mouse"
MOUSE_SENSITIVITY="1.15/15"
# Display number to use
DISPLAY_NUMBER=":1"
# Nice priority to give to wine. Note some games (ex Starcraft) do not like -20.
PRIORITY=-5

GAME_PLAYER=$USER

# extract
APPDIR=${PROGRAM%/*}
APPEXE=./${PROGRAM##*/}

SCRIPT="xgamma -gamma $GAMMA
 xset mouse $MOUSE_SENSITIVITY
 cd \"$HOME/.wine/dosdevices/$APPDIR\"
 sudo -u $GAME_PLAYER nice $PRIORITY wine $APPEXE $*
 wait"

# Run full screen on display 1.
export DISPLAY=$DISPLAY_NUMBER

# Make sure user is allowed to use display 1.
[ "`xauth list $DISPLAY_NUMBER`" ] || xauth add $DISPLAY_NUMBER . `mcookie`

sudo xinit /bin/sh -c "$SCRIPT" -- $DISPLAY -screen $SCREEN_RES -depth $SCREEN_BPP


I just have to run xmen2.sh to play the game.

:D
_________________
A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes
Back to top
View user's profile Send private message
slackthumbz
Tux's lil' helper
Tux's lil' helper


Joined: 03 Mar 2005
Posts: 142
Location: Cambridge, UK

PostPosted: Wed Dec 20, 2006 3:57 pm    Post subject: Reply with quote

you could also try using xnest to create a separate login, at least then if the xserver crashes you won't lose your current desktop.
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Wed Dec 20, 2006 4:32 pm    Post subject: Reply with quote

not that I care a lot, but Gotterdammerung just rewrote parts of xlaunch, everythings he does here, was already possible with xlaunch, (including the variable definition and so on)...


slackthumbz, if my game crash (which happen sometimes with wine&warcraft), I don't have any problem on my desktop, I don't see the problem? And as for the separate login, note that you can enable the "XPLAYER" feature wich allow you to launch a given application on a other Xserver/display using sudo.
_________________
The End of the Internet!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum