2019-09-26 08:17:01

Hello guys,
Is it possible to run a server written with BGT on ubuntu server (VPS)?
'Cause I've seen some people do this.
I tried to do that and wine threw out these errors which I can't understand.

my-username@ubuntubox:~/server$ wine server.exe
004e:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
004e:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
004e:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default

2019-09-26 08:33:04

You're missing, like, the entire desktop environment. Not surprising, considering it's a VPS, but that's basically what Wine's telling you. Specifically, Gnome or something else isn't 1: installed and 2: running. Which, again, you're on a VPS, so not surprising. You're also missing audio libraries.

Translation: you're running a Windows server that expect to be able to output audio on a box that is both incapable of running a Windows server and doesn't have (or need!) audio support. Good luck.

2019-09-26 08:40:34 (edited by black and white 2019-09-26 08:42:19)

Umm, Should I install an entire desktop environment on a vps?
I mean there's no something like NVDA remote or something like that to work with the DE.
I've seen people running BGT Servers under linux and as far as I know there's no way to remotely use linux DE or window managers in an accessible way.
'Cause the only graphical remote I know of is VNC which doesn't transmit sound.

2019-09-26 09:29:27

Can you? Yes. Should you? That depends how beefy your VPS is.

I don't know how many of these people have BGT running on a Linux server they don't have physical access to, but basically, you don't have a display driver installed, or an audio driver installed, and Wine doesn't like that. So, yes, basically, you're going to need to install an entire desktop environment on your VPS to make it fight nicely. That's literally what the output you pasted is telling you.

2019-09-26 11:17:03

Can't I just go with xorg + openbox or something lightweight like that?

2019-09-26 11:30:09

Try using wine3. It works for me, yes it throws 2000 errors but when I try to connect to it it works

2019-09-26 11:42:13

Short answer, you can't do it properly, long answer, unless you want to switch to a more crossplatform solution like python, I'm afraid you must somehow obtain a windows server in order for it to work properly.

2019-09-26 14:00:16

You can run a bgt server on wine just fine. Simply specialize your server correctly to work on something that can't show windows and can't play audio. Remove any sound playing from your server, even possibly any dll calling(screen reader speech), and make it so it doesn't show a window and runs in the background. Just remove the show_game_window function call. Then it should work. We ran bgt servers On wine both on ubuntu and sentOS

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2019-09-26 17:37:42

Hi,
In addition to what Kianoosh said (Removing the "show_game_window" function and not using any DLL calls or any speech functions), Running servers written in BGT is very simple; You just need to use nohup command.
But how you do it?
Right.
The command is really simple:

nohup wine server_executable_file 2>&1

replace server_executable_file with the name of your server file.
For example:

nohup wine server.exe 2>&1

Obviously, This command needs to be run in the server location; So don't forget to CD to its directory or specify a full path.

Co-founder of Sonorous Arts.
Check out Sonorous Arts on GitHub: https://github.com/sonorous-arts/

2019-09-27 00:27:07

I'm not exactly sure how, but i know people like, for example, mason do it. Not sure if he has access to his box but he does it regardless.

2019-09-27 06:31:27

@kianoosh and @ reza.jdp thank you very much.
@Ty: Yeah, Also I remember a while back one of the devs of TK (I'm not sure it was Ivan or X0) posted here about copying BGT output while running under wine. I remember he said that we are currently running TK under wine. That's why I'm saying other people have done it.

2019-09-27 09:57:01

Oh and make sure your compilinh your server. The actual bgt won't run on it.

2019-09-27 11:31:25

mazen is right, wine throw out10000000 errors, but it work,  it is tricky but when you understand it you will know how to do it

2019-09-27 14:47:24

I mean we were running Firefight under Wine on a Centos server; That's pretty much what you need to do to get it running.
You don't need to install anything special; Wine and nohup do the trick.
Well if you get a Display installed and configured for Wine, You could have the screen output in the "nohup.out" file.
Although without anything special installed, You can have your executable file running but without a display output.

Co-founder of Sonorous Arts.
Check out Sonorous Arts on GitHub: https://github.com/sonorous-arts/

2019-09-27 19:48:13

nohup wine server.exe&

Ivan M. Soto.
Feel free to check out my work and services.
http://ims-productions.com

2019-09-28 10:48:24

Thanks @ivan_soto, @reza.jdp, @kingzombie and @mohamed.
Yay! Today I managed to run my server under Wine! smile
Thanks everyone, You're all amazing!

2019-09-30 22:56:13

Glad you could get it to work.
smile

Co-founder of Sonorous Arts.
Check out Sonorous Arts on GitHub: https://github.com/sonorous-arts/