All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Please remove X requirement! PostPosted: Mon Dec 28, 2009 11:51 am  

Location: West Yorkshire, England
So, i've tried setting up TS:HB using WINE in console mode, it doesn't work. It would appear TS:HB requires a graphical enviroment, which as any serious linux server operator will tell you, is like throwing it's resources (and in some cases its security) into the nearest bin. Could you PLEASE consider making TS:HB server run natively in Linux, and not require any graphics, so it can be run in screen and terminal. This would make it alot easier to host a server that isn't home and laggy (no ones likes connecting to homeservers unless they're in the same room) and hopefully bring players back if we actually have servers from around the world.

_________________
Image


 
 Profile  
 
 Post subject: Re: Please remove X requirement! PostPosted: Mon Dec 28, 2009 12:15 pm  
Iocaine Dev
We don't have the resources to turn TS:HB into a native linux app, but I can attest that I have managed to run it in a headless mode with no GUI. The Dedicated Server is in fact a win32 "console" application (use 'wineconsole' instead of 'wine', I think). WHen the dedicated server starts up, it creates the main window. However, when you run it with -console, it doesn't even attempt to use any win32 resources, does not create a main window, or use any GUI related windows commands.

You should be able to run it headless, I've seen it work even via telnet. I don't currently have access to a linux environment to test this on anymore, but since nothing has changed in quite a while, the old steps on the wiki should still work. You're still going to need to find a copy of the D3DX9 dll that is required.

using "wineconsole hbds.exe -console" I did manage to run it completely headless, so I'll need to know more about what's missing before I can see what else I can do about this.

The wiki also mentions doing this
export DISPLAY=""
before the wineconsole command.

Not sure what else to post here.


 
 Profile  
 
 Post subject: Re: Please remove X requirement! PostPosted: Tue Dec 29, 2009 9:05 am  

Location: West Yorkshire, England
All my attempts to run TS:HB server on Linux without installing X and a Window Manager (I use something calls TWM, or Toms Window Manager) have failed, and when trying to launch TS:HB:DS in an enviroment with absolutely no graphical things installed has always resulted in TS:HB:DS runtime crashing. I've tried CentOS and Debian.

This is the exact set of errors;

leopard:~/valve/tshb_server# export DISPLAY=""
leopard:~/valve/tshb_server# wineconsole hbds.exe -console
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:wineconsole:WINECON_Fatal Couldn't find a decent font, aborting


Which to me confirms you do need to have X loaded...
Also, the install has been loaded with all of the default MS Fonts.

_________________
Image


 
 Profile  
 
 Post subject: Re: Please remove X requirement! PostPosted: Mon Jan 04, 2010 11:28 pm  
Iocaine Dev
that's really, really odd. If you inspect the hbds.exe executable you'll find its not an actual win32 windowed app (with a winmain), its actually a windows console app using the console subsystem, with a different entry point (just a regular main() function).

Perhaps its pissed that we call winmain() from main(), even though its entire innards are ifdef'd out. I'm wondering how exactly it decides its trying to open a window...

IS there perhaps a virtualbox image somewhere I can use that is headless? I'm willing and curious to see what's up but I don't have spare hardware to install a new OS On...

The alternate explanation is that it attempts to show a messagebox of some kind because there's an error (although in -console mode that becomes printf).

I wonder if there's any ready-to-go images, even in a vmware appliance, that I can just drop the hbds.exe onto with a bunch of extra printfs to see what its doing...


 
 Profile  
 
 Post subject: Re: Please remove X requirement! PostPosted: Tue Jan 05, 2010 12:21 am  
Iocaine Dev
I got a headless ubuntu running here, and can see the error messages.

Interestingly, those messages print out but it keeps going (ie, its actually still spamming to console). If you add --backend=curses to the wineconsole command line (before hbds.exe) it spams a lot more to a fresh curses window, indicating that its somehow missing the console spam.

AH! I got it working

Two magic tricks (hooray linux)

ONe: Use the curses backend so that you can type in the console. Add --backend=curses to the command line.

SEcondly, DISABLE STEAM COMMUNITY FEATURES in your hostoptions.cfg in the data folder. It looks like steam does not play nicely if you don't have its dlls or such. Either way. After doing that (setting it to false in HostOptions.cfg) and using --backend=curses, I get it working in my headless virtualbox. It looks like if you don't specifically tell it to use CURSES, it (ie, wine) tries to open some sort of x-window that looks like a msdos box prompt or something but still acts like a win32 window or something (I'm really not sure.).

For me this even works with SCREEN:

screen wineconsole --backend=curses hbds.exe

This allows me to run it and then leave it running in the background yet still interact with it when I return
http://www.rackaid.com/resources/linux- ... nd-how-to/

And remember to copy the dll mentioned in the wiki or very strange things MIGHT occur. It did a year ago (rockets spawning in middle of the map). Maybe wine has gotten better by now?

Even virtualized, it was using zero cpu while waiting for players to connect. No idea how that would have gone with real players ;p


 
 Profile  
 
 Post subject: Re: Please remove X requirement! PostPosted: Fri Jan 08, 2010 7:47 pm  

Location: West Yorkshire, England
aha, got it running on screen, fantastic. Thanks Vek!

_________________
Image


 
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2002, 2006 phpBB Group