Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Success with Wine, Deus Ex, Half-Life, and more!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Jamon
Apprentice
Apprentice


Joined: 03 May 2002
Posts: 173

PostPosted: Sat Sep 13, 2003 2:38 am    Post subject: Success with Wine, Deus Ex, Half-Life, and more! Reply with quote

Hello! I wanted to share with you all the recent lookings around and hacking I have been doing to get my wine config just so. My goal was to be able to run Deux Ex and Half-Life perfectly (or as close as possible) without a Windows install being necessary. I also have a fix (or, should I say work around) for the common keyboard input not working bug! :) So, here we go!

1) I am running a fake_windows installation. I found that with WinME or Win2k, Half-Life would die a miserable death.

2) I am running the most current version of Wine. I don't play CS, btw.

One thing that I noticed about the common keyboard input problem is that many games work in window mode with Wine in managed = Y mode, but with managed = N the fullscreen works, but the keyboard entry does not. So what I have done is work around the problem by giving Wine its own X server to play in, without a window manager to catch the keystrokes! Here are a few small scripts I made to help this.

Everything I made I put in /usr/local/bin:
winerunhelper:
Code:
exec /usr/bin/wine $1

This is used by my next script, winerun:
Code:
XF86CONFIG=XF86Config.1024 xinit /usr/local/bin/winerunhelper $1 -- :5

This script is what the user would call; the XF86CONFIG part is to use a custom XF86Config file, which in my case makes the max resolution 1024x768 (I run my desktop at 1280x1024). Then it runs xinit, with the previous script as the xinit file (instead of .xinitrc), with a command line argument of the program wine will run, which is passed up to winerunhelper, and the -- :5 tells X to start in virtual session 5 (unlikely to be already used). It works very nicely! My Wine config has these major options set:

Code:
"Managed" = "Y"
"UseDGA" = "Y"
"UseXShm" = "Y"
"UseXVidMode" = "Y"
"DXGrab" = "Y"


As for Deus Ex configuration, I am using the enhanced OpenGL renderer available from http://cwdohnal.home.mindspring.com/utglr/
This renderer works really well, but it requires one Windows .dll, msvcp60.dll, which needs to be copied to ~/.wine/fake_windows/Windows/System. After that, it works great for me! Let me know what you think!

Jamon

Edit: Putting Half-Life in the subject might get more people's attention. ;)
_________________
Looking for a Linux PC? Check us out at
http://www.progresssystemsinc.com!
Back to top
View user's profile Send private message
Jamon
Apprentice
Apprentice


Joined: 03 May 2002
Posts: 173

PostPosted: Sat Sep 13, 2003 4:47 pm    Post subject: Reply with quote

One question about Half-Life. Is it typical to get a few error messages on startup about missing MCI files? (some audio thing) The menu isn't perfect either, but the game itself works great. Thoughts?

Jamon
_________________
Looking for a Linux PC? Check us out at
http://www.progresssystemsinc.com!
Back to top
View user's profile Send private message
Blue Lightning
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2003
Posts: 137
Location: Auckland, New Zealand

PostPosted: Sun Sep 14, 2003 7:46 am    Post subject: Reply with quote

Yes, the MCI errors are normal, but you can get rid of them. I have a little shell script that I use to run HL:

Quote:

cd /mnt/wineapps/Games/Half-Life/
wine hl.exe -nointro -console -desktop 1280x1024 -numericping -gl -gldrv Default -w 1024
Back to top
View user's profile Send private message
Merlin-TC
l33t
l33t


Joined: 16 May 2003
Posts: 603
Location: Germany

PostPosted: Sun Sep 14, 2003 9:43 am    Post subject: Reply with quote

I guess the MCI error is caused by the videos it tries to play.

It sounds like your FAQ could solve my keyboard problem what we discussed before in the Jedi Academy (Elite Force) thread the problem is I not fully understand it :(

I have to create two scripts, winerunhelper and winerun, then put both of them into /usr/local/bin and make then executable.
But what to do next?

I am sure this would help many people.

Thank you
Back to top
View user's profile Send private message
Malek
Apprentice
Apprentice


Joined: 16 Aug 2003
Posts: 182
Location: Sucking up the Vespene

PostPosted: Sun Sep 14, 2003 7:21 pm    Post subject: Reply with quote

Yes the MCI scripts are from a certain audio codec used in the beginning movies...

You should always run half life however via wine/winex hl.exe --console

Consoles are your best friends for the most part in just about any modification or main game and plus they cancel the beginning movies. Problem solved.
Back to top
View user's profile Send private message
Jamon
Apprentice
Apprentice


Joined: 03 May 2002
Posts: 173

PostPosted: Sun Sep 14, 2003 10:29 pm    Post subject: Reply with quote

Thanks for your help on the MCI files. I will look into that. I would guess from what you are saying that if I want to enjoy Half-Life's single player game (which I assume uses movies) this may not be the best option for me perhaps? Should I use Windows for that instead? (Please, nooo!! ;) )

Merlin, sorry I was not more clear. I meant that instead of typing wine type winerun at a console. ex:
Code:
 $ winerun /path/to/your/favorite/game.exe

You can also add KDE menu items (and probably other window systems as well) and it works fine. I launch both games that way most of the time now. My KDE menuitem desktop command is simply
Code:
/usr/local/bin/winerun /path/to/game.exe
with an appropriate label and icon to make it look pretty ;). I use the Wine icon to keep it clear. I hope that helps!

As for Half-Life, it seems that I might need to add more $'s to the script or make a custom version just for that game so it doesn't error on startup anymore. Regardless, we're working in the right direction now. :) Thanks!

Jamon
_________________
Looking for a Linux PC? Check us out at
http://www.progresssystemsinc.com!
Back to top
View user's profile Send private message
ieatchicken
n00b
n00b


Joined: 14 Aug 2003
Posts: 58

PostPosted: Mon Sep 15, 2003 1:30 am    Post subject: Reply with quote

Half-life's single player does not use any movies. All cut scenes and the like are done with scripted in game sequences, usually while you are in control of your character. That was one of the many things that made it half-life special.

The only movies it has are the sierra and valve intro logos.
Back to top
View user's profile Send private message
Jamon
Apprentice
Apprentice


Joined: 03 May 2002
Posts: 173

PostPosted: Mon Sep 15, 2003 2:07 am    Post subject: Reply with quote

That's good to know. :) Do you know if the ending uses a movie?

Jamon
_________________
Looking for a Linux PC? Check us out at
http://www.progresssystemsinc.com!
Back to top
View user's profile Send private message
Merlin-TC
l33t
l33t


Joined: 16 May 2003
Posts: 603
Location: Germany

PostPosted: Mon Sep 15, 2003 4:21 am    Post subject: Reply with quote

Thanks for explaining it again Jamon :)
I will give it a try as soon as I am home again, gotto go to work in 20 minutes :-/

And no, the ending uses the game engine too so you can also enjoy it in linux :)
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7695
Location: Pelotas, BR

PostPosted: Mon Sep 15, 2003 10:22 pm    Post subject: Reply with quote

Moved to D, T & T

Thanks, senectus
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Jamon
Apprentice
Apprentice


Joined: 03 May 2002
Posts: 173

PostPosted: Tue Sep 16, 2003 7:43 pm    Post subject: Reply with quote

Looks like my post got 'promoted' to D, T & T! :) (Yay for post!)

Jamon
_________________
Looking for a Linux PC? Check us out at
http://www.progresssystemsinc.com!
Back to top
View user's profile Send private message
Merlin-TC
l33t
l33t


Joined: 16 May 2003
Posts: 603
Location: Germany

PostPosted: Sat Sep 20, 2003 10:54 pm    Post subject: Reply with quote

But I have one problem with it.
When I run it out of KDE it crashed my whole PC but when I start it from a console (without kde running already) it works fine.
Any suggestions Jamon?
Back to top
View user's profile Send private message
Jamon
Apprentice
Apprentice


Joined: 03 May 2002
Posts: 173

PostPosted: Fri Sep 26, 2003 3:08 am    Post subject: Reply with quote

Hmm. I don't have this problem on my desktop, but I have had strange problems like it on my laptop where if I change to a virtual console my X server (most often KDE) will crash. I wonder if it's related or not. I am running an old 700MHz laptop with an ATI M1 Mobility (Rage Pro equiv.). I would be surprised that such an old chipset would have anything other than name ;) in common with the new ones, but you never know... I would really like a fix myself. ;) (And I am thinking of moving to an ATI card, and if this problem joins me on my desktop I am going to be none too pleased.)

Jamon
_________________
Looking for a Linux PC? Check us out at
http://www.progresssystemsinc.com!
Back to top
View user's profile Send private message
Cosmosis
n00b
n00b


Joined: 13 Dec 2003
Posts: 59

PostPosted: Sun Dec 14, 2003 5:21 am    Post subject: Reply with quote

I tried your method and followed all the steps but when I go to run a game it starts the X server in terminal 5 and then does nothing. in the terminal I launched it from I see...



Code:
AUDIT: Sun Dec 14 00:18:27 2003: 1970 X: client 1 rejected from local host
Xlib: connection to ":5.0" refused by server
Xlib: No protocol specified



Any ideas??
Back to top
View user's profile Send private message
jlogday
n00b
n00b


Joined: 13 Apr 2003
Posts: 17
Location: Atlanta, GA

PostPosted: Mon Dec 15, 2003 3:25 am    Post subject: Reply with quote

Cosmosis wrote:

Code:
AUDIT: Sun Dec 14 00:18:27 2003: 1970 X: client 1 rejected from local host
Xlib: connection to ":5.0" refused by server
Xlib: No protocol specified



Any ideas??


You've started an X server on display :5, but haven't authorized any clients to connect to it. Try this modified winerun script:

Code:
display=:5
authfile=$HOME/.Xauthority

if ! xauth list "$display" | grep "$display " >/dev/null 2>&1; then
    xauth add $display . `mcookie`
    removelist="$display"
fi

XF86CONFIG=XF86Config.1024 xinit /usr/local/bin/winerunhelper $1 -- :5 -auth $authfile

if [ -n "$removelist" ] ; then
    xauth remove $removelist
fi
Back to top
View user's profile Send private message
Cosmosis
n00b
n00b


Joined: 13 Dec 2003
Posts: 59

PostPosted: Mon Dec 15, 2003 6:07 am    Post subject: Reply with quote

Awesome!

that works perfectly :)

Thanks alot bro

-Tim
Back to top
View user's profile Send private message
FancyLad
n00b
n00b


Joined: 06 Jun 2003
Posts: 9

PostPosted: Tue Dec 23, 2003 3:08 am    Post subject: Reply with quote

Code:
#!/bin/bash
display=:5
authfile=$HOME/.Xauthority

if ! xauth list "$display" | grep "$display " >/dev/null 2>&1; then
    xauth add $display . `mcookie`
    removelist="$display"
fi

XF86CONFIG=XF86Config.1024 xinit /usr/local/bin/winerunhelper $@ -- :5 -auth $authfile

if [ -n "$removelist" ] ; then
    xauth remove $removelist
fi


Code:

#!/bin/bash
exec /usr/bin/wine -- $@


and in Xqf set the game properto to:

half life:

Code:

/usr/local/winerun /path/to/hl.exe


Xqf will put the neccessary commands to start the right gametype and connect to the right server. The $@ will ensure that all parameters get passed on to the next script.


Just thought I'd add a bit here in case someone else was having this trouble.
Back to top
View user's profile Send private message
discowombat
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2003
Posts: 106
Location: The Cornfields

PostPosted: Wed Mar 17, 2004 1:15 am    Post subject: Reply with quote

I have been trying to get counter-strike to work, but have had some trouble getting it to receive keyboard focus. I tried this method, which fixed the keyboard focus problem but created another one. The 2nd x server doesn't have DRI on it, making gameplay impossible. An excerpt from XFree86.5.log:
Code:

drmOpenByBusid: busid is PCI:0:2:0
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 7, (OK)
drmOpenByBusid: drmOpenMinor returns 7
drmOpenByBusid: drmGetBusid reports PCI:0:2:0
(II) I810(0): [drm] drmSetBusid failed (7, PCI:0:2:0), Device or resource busy
(EE) I810(0): [dri] DRIScreenInit failed. Disabling DRI.

Is there any way to turn the dri off for the current x server before it tries to start the new one (or any other solution?) For some reason everyone seems more concerned about getting DRI to work than turning it off :wink:
If worst comes to worst, i guess i'll have to log out and log into the x session separately - but i'm trying to avoid that. If you guys got it to run from kde there's gotta be something i'm missing.
_________________
One by one the penguins steal my sanity
Back to top
View user's profile Send private message
The Mountain Man
l33t
l33t


Joined: 03 Sep 2003
Posts: 643

PostPosted: Thu Apr 08, 2004 4:06 am    Post subject: Reply with quote

Wow! I just discovered this thread after being constantly frustrated over the keyboard not working in Wine. The two shell scripts work great and Deus Ex runs perfectly using the stock OpenGL renderer. This thread should be stickied seeing as keyboard focus is a common question!
_________________
I suck at signatures.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Fri Jul 23, 2004 4:57 pm    Post subject: Reply with quote

Excuse a litlle 'off' here but I've seen this quote a bit too often to ignore it again.

Quote:
"Who do you think America's enemies would rather have
in the White House, George Bush or John Kerry?"


The question is fair but the implied answer is probably not. Consider a similar question for another country:

"Do do you think Iraq's enemies would rather Saddam Hussein returned to power?"

If the answer is "no" does this mean the iraqis should want him back?


Perhaps a better question would be "who do you think Americas allies would rather have in the White House?" :!:

Just my thought for the day, please dont turn this thread into campain trail.

8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Fri Jul 23, 2004 5:00 pm    Post subject: Reply with quote

@Jamon

You obviously have you WINE running well.

Could you post some indication of you sound setup. I can't get a damn thing out of mine.

I running 2.6.6 kernels alsa* compliled in , have tries both alsa and oss in the .wine/config to no avail.

Thx.
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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