Installing a Bot on Debian

Questions about Wine on Linux
Locked
pongy20
Level 2
Level 2
Posts: 11
Joined: Wed May 01, 2019 6:47 am

Installing a Bot on Debian

Post by pongy20 »

Hey, i am totally new in Wine. I have a issue with installing an Bot on my Server.
Here is the download link: https://lordsandknightsbot.com/downloads/

When I open the .exe, it works perfectly. But after a few steps I have to click on install and then it stucks and is not doing anymore. Can somebody help me?
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: Installing a Bot on Debian

Post by jkfloris »

Can somebody help me?
Hard to tell without a terminal output.

But I get the program running with:
- wine-staging 4.7
- 32-bit wineprefix
- winetricks -q dotnet452
pongy20
Level 2
Level 2
Posts: 11
Joined: Wed May 01, 2019 6:47 am

Re: Installing a Bot on Debian

Post by pongy20 »

What you excactly does? I simply executed the .exe and selected the installation folder then the dialog comes with the button "install" when I click on this button a small whitescreen came.

I thought this is because the .exe creates a .msi and wine is not able to execute this.
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: Installing a Bot on Debian

Post by jkfloris »

Make sure you have installed wine-staging from the WineHQ repo. (Read https://wiki.winehq.org/Debian for more information.)
And you have installed a recent winetricks version. (You could use the version from Debian Sid and run "winetricks --self-update")

Because you need to install the .Net framework, I recommend to create a new 32-bit wineprefix.
All in one terminal line:

Code: Select all

WINEPREFIX=~/bot WINEARCH=win32 WINE=/opt/wine-staging/bin/wine winetricks -q dotnet452
After winetricks has successful finished. Install the bot:

Code: Select all

WINEPREFIX=~/bot /opt/wine-staging/bin/wine start /unix path/to/lordsandknightsBOTv4.12.setup.exe
Each time you want to run the bot you have to set the WINEPREFIX variable.

Code: Select all

cd "~/bot/drive_c/users/<name>/Application Data/lordsandknightsbot.com/Lords & Knights Bot"
WINEPREFIX=~/bot /opt/wine-staging/bin/wine LAKBot.exe
I thought this is because the .exe creates a .msi and wine is not able to execute this.
Wine can run msi files, so that shouldn't be the problem
https://wiki.winehq.org/Msiexec
pongy20
Level 2
Level 2
Posts: 11
Joined: Wed May 01, 2019 6:47 am

Re: Installing a Bot on Debian

Post by pongy20 »

Hey, thanks for your answer. I am very happy to see how much you do for my problem :). THANKS!!!

lakbot@vps:~$ WINEPREFIX=~/lakbot WINEARCH=win32 WINE=/opt/wine-staging/bin/wine winetricks -q dotnet452
------------------------------------------------------
WINE is /opt/wine-staging/bin/wine, which is neither on the path nor an executable file
------------------------------------------------------
lakbot@vps:~$ WINEPREFIX=~/lakbot /opt/wine-staging/bin/wine start /unix path/to/lordsandknightsBOTv4.12.setup.exe
-bash: /opt/wine-staging/bin/wine: No such file or directory
lakbot@vps:~$

This appears when I type it in. The user where I want to install the bot is named "lakbot" and have a directory in /home/lakbot

Sorry, I feel like very stupid in asking so many dump questions but what am I doing false :(
pongy20
Level 2
Level 2
Posts: 11
Joined: Wed May 01, 2019 6:47 am

Re: Installing a Bot on Debian

Post by pongy20 »

Ok, I think I found the problem. Now I want to start the bot but this message appears:

Code: Select all

root@vps:/home/lakbot# WINEPREFIX=~/bot /opt/wine-stable/bin/wine start lordsandknightsBOTv5.3.setup.exe
004a:fixme:exec:SHELL_execute flags ignored: 0x00000100
root@vps:/home/lakbot# 004c:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
004c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
004c:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
004c:fixme:ver:GetCurrentPackageId (0x33fe34 (nil)): stub
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Installing a Bot on Debian

Post by Bob Wya »

pongy20 wrote:Ok, I think I found the problem. Now I want to start the bot but this message appears:

Code: Select all

root@vps:/home/lakbot# WINEPREFIX=~/bot /opt/wine-stable/bin/wine start lordsandknightsBOTv5.3.setup.exe
004a:fixme:exec:SHELL_execute flags ignored: 0x00000100
root@vps:/home/lakbot# 004c:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
004c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
004c:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
004c:fixme:ver:GetCurrentPackageId (0x33fe34 (nil)): stub
You should never run Wine as your Linux root user.
See: WineHQ FAQ: 6.2 Should I run Wine as root?

Note: this is also why Wine is unable to draw to your X display (since you haven't setup X display access for your root user).

Edit: a-ha.. A VPS... Hmmm...

Bob
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: Installing a Bot on Debian

Post by jkfloris »

-bash: /opt/wine-staging/bin/wine: No such file or directory
Did you install the winehq-staging packages?

Code: Select all

sudo apt install --install-recommends winehq-staging
pongy20
Level 2
Level 2
Posts: 11
Joined: Wed May 01, 2019 6:47 am

Re: Installing a Bot on Debian

Post by pongy20 »

I tried it a thousand times and it still is not working. Maybe is it possible to contact someone of you who can set this up for me? I would be so happy when it is working after spending so many hours :/. Sorry i am so stupid.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Installing a Bot on Debian

Post by Bob Wya »

pongy20 wrote:I tried it a thousand times and it still is not working. Maybe is it possible to contact someone of you who can set this up for me? I would be so happy when it is working after spending so many hours :/. Sorry i am so stupid.
Well it definitely is stupid to suggest that random strangers, on the Internet, are given access to your VPS to pone it! :roll:

Wine requires a running X Server, for all but the simplest (pure-console) Windows applications.
This makes it bit harder to setup on a headless server (and it's generally not recommended, for security reasons, anyway)...
There are plenty of simple guides, on the Internet, documenting this process. e.g.: Running graphical application like wine on a headless server with xvfb.

Xvfb is a virtual X Server that Linux applications can render to, without any physical display, or monitor, attached to the system.

Bob
pongy20
Level 2
Level 2
Posts: 11
Joined: Wed May 01, 2019 6:47 am

Re: Installing a Bot on Debian

Post by pongy20 »

Ok, now I got another error message. Here you can see it.

Code: Select all

/opt/wine-staging/bin/wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message 'wine client error:0: version mismatch 571/581.
Your wineserver binary was not upgraded correctly,
or you have an older one somewhere in your PATH.
Or maybe the wrong wineserver is still running?'
------------------------------------------------------
root@vps:~# WINEPREFIX=~/bot /opt/wine-staging/bin/wine start /unix path/to/lordsandknightsBOTv4.12.setup.exe
wine client error:0: version mismatch 571/581.
Your wineserver binary was not upgraded correctly,
or you have an older one somewhere in your PATH.
pongy20
Level 2
Level 2
Posts: 11
Joined: Wed May 01, 2019 6:47 am

Re: Installing a Bot on Debian

Post by pongy20 »

I have installed wine staging 4.7
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Installing a Bot on Debian

Post by Bob Wya »

@pongy20

Can you post the output from:

Code: Select all

dpkg -S "$(which wineserver)"
dpkg -S "$(which wine64)"
dpkg -S "$(which wine)"
Ta
Bob
pongy20
Level 2
Level 2
Posts: 11
Joined: Wed May 01, 2019 6:47 am

Re: Installing a Bot on Debian

Post by pongy20 »

Hey, here is the output.

Code: Select all

root@vps:~# dpkg -S "$(which wineserver)"
dpkg-query: no path found matching pattern
root@vps:~# dpkg -S "$(which wine64)"
dpkg-query: no path found matching pattern
root@vps:~# dpkg -S "$(which wine)"
wine: /usr/bin/wine
root@vps:~#
Cybermax
Level 4
Level 4
Posts: 218
Joined: Fri Dec 01, 2017 5:26 pm

Re: Installing a Bot on Debian

Post by Cybermax »

pongy20 wrote:Ok, now I got another error message. Here you can see it.

Code: Select all

/opt/wine-staging/bin/wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message 'wine client error:0: version mismatch 571/581.
Your wineserver binary was not upgraded correctly,
or you have an older one somewhere in your PATH.
Or maybe the wrong wineserver is still running?'
------------------------------------------------------
root@vps:~# WINEPREFIX=~/bot /opt/wine-staging/bin/wine start /unix path/to/lordsandknightsBOTv4.12.setup.exe
wine client error:0: version mismatch 571/581.
Your wineserver binary was not upgraded correctly,
or you have an older one somewhere in your PATH.
Usually this error happens if you have a crashed wineserver, and then switch to a different wine version.

Code: Select all

ps aux|grep -i wine
Other than that, running wine headless is usually a pita... If the bot program is a "true cli program" (ie. no graphical window, but PURE text you can run from cmd in windows), you could perhaps try "unset DISPLAY", or even compile wine yourself with configure option "--without-x".

The lordsandknightsBOTv4.12.setup.exe indicates its a graphical setup program tho, but maybe you could install it on a windows computer and copy the folder over if its no fancy registry settings or system services required.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Installing a Bot on Debian

Post by Bob Wya »

pongy20 wrote:Hey, here is the output.

Code: Select all

root@vps:~# dpkg -S "$(which wineserver)"
dpkg-query: no path found matching pattern
root@vps:~# dpkg -S "$(which wine64)"
dpkg-query: no path found matching pattern
root@vps:~# dpkg -S "$(which wine)"
wine: /usr/bin/wine
root@vps:~#
You want to uninstall the obsolete wine package and install the winehq-staging package (which will install: /usr/bin -> /opt/wine-staging/bin ; compatibility symlinks).

Bob
Locked