How can I host DayZ Standalone on a remote Linux server? I'm getting "Wine Mono is not installed"

8,782

Forwarding X

This answer assumes you are using--or can use--ssh to access the server. To avoid ambiguity, I've referred to the server on which you wish to install DayZ Standalone Server as the "SSH server." In contrast, an "X server" is a program that runs on the SSH client. The SSH client is the machine you are using to connect to the server. I presume the SSH client itself has a graphical interface.

So long as the SSH client machine has a display and an X server (such as X.org) installed on it, it shouldn't be a problem that the SSH server doesn't have one. If an X server is installed on the SSH client, you can run

ssh -X ssh-server

with ssh-server replaced by the actual hostname or IP address of the SSH server. Then you can run graphical programs on the SSH server, and their graphical interfaces will be created on the SSH client. That is, you run a command in your SSH session that runs a graphical program, and the program window comes up on your desktop, even though the program itself is running on the SSH server.

If the SSH client is Ubuntu or another GNU/Linux system and a GUI is installed on it, then you probably don't have to install anything else on it. Otherwise, an X server may or may not be available. In particular, Windows does not come with one. Various X servers for Windows are available, such as VcXsrv.

As you've rightly said, the difficulties you've had so far are entirely due to the inability to run graphical programs. ssh -X from an SSH client that is running an X server is typically sufficient to solve that.

From this point forward, all installation instructions are intended to be run on the SSH server.

Testing X Forwarding

I suggest testing this with something simple, first:

  • xclock runs a simple graphical clock application. It's a good choice for testing X forwarding. xclock is provided in the x11-apps package.
  • To test if Wine works in this situation, you can use wine notepad or wine explorer.

Although some libraries are required on the SSH server for this to work, the wine package has the x11-common package as a dependency, which is sufficient to provide them.

64-bit and 32-bit Wine

I presume you have installed the wine package already, but for readers who have not:

sudo apt update
sudo apt install wine

If the SSH server is running a 64-bit Ubuntu system (highly likely) and you need to run 32-bit Windows programs, then you can enable the installation of 32-bit packages and install the wine32 package:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine32

Winetricks

winetricks, and the installers it automatically downloads and runs, are likely to work. But if you want to use winetricks's own graphical interface--which I do recommend--then you'll need the zenity package. But I don't recommend installing zenity in the usual way, because that would pull in a huge amount of software as dependencies--basically, an entire graphical interface on the server that will be of no help to you. Instead, install zenity with:

sudo apt install --no-install-recommends zenity

That may still install plenty of libraries as dependencies, but far less, and no useless X server. (An X server does no good on the SSH server, which as you say has no display.)

Wineprefixes

You may want to create an use a wineprefix, especially if you need to run 32-bit Windows programs with Wine. See How do I create a 32-bit WINE prefix?

Winetricks can help with this. When you run it and don't pass any arguments, its graphical interface comes up, and one of the options is:

Create new wineprefix

If you select that and click OK, you are prompted to select your architecture (the options are named "32" and "64" and to specify a name for the prefix).

For more information, including how to choose a wineprefix to run programs, see How to install 32 Bit Wine on 64 Bit Ubuntu?, including Relish's answer.

Wine Mono, or the .NET Framework

If Wine Mono is not installed, you can download the .msi file for it from the Wine website. As of this writing, the latest version of 4.9.4.

As PSN's answer to Mono Package for Wine is not installed says, the unusual command wine uninstaller may be used to install it. Without specifying a Wine prefix, this, this install it for 64-bit Wine, assuming the server is 64-bit. (Even though there is a wine32 package, there is no longer a separate wine32 command; instead, use a 32-bit wineprefix.)

Another way to run uninstaller, which may be easier if you have made a wineprefix that you want to use, is to run winetricks and, after selecting your prefix, select:

Run uninstaller

As an alternative to Wine Mono, you can install the Microsoft .NET Framework in Wine. Which version you will want depends on the application you need it for. You can install them with Winetricks, under:

Install a Windows DLL or component

Your mileage may vary...

I don't know how well this will work to run the DayZ Standalone Server. But if the DayZ Standalone Server need only a basic graphical interface (unlike, for example, the game itself) and if it works in Wine (which has been reported, though I'm not sure how current that procedure is), then I would expect this to work.

I've found that Windows applications that work locally on Wine will also work on Wine on a remote SSH server via ssh -X. However, you should expect their interfaces to be less responsive than those of a local program. Depending on the latency, reliability, and (probably to a lesser extent) speed of your network connection to the server, the responsiveness might be enormously worse.

Furthermore, because I don't know what procedure you're using to install it, I've only given generic advice about how to run graphical Windows applications with Wine on an SSH server (and to forward X, with ssh -X, to do so).

Share:
8,782
ItzGoomig
Author by

ItzGoomig

Updated on September 18, 2022

Comments

  • ItzGoomig
    ItzGoomig over 1 year

    I am trying to host a DayZ Standalone Server on Linux and I need Wine to run the EXE file. I have downloaded wine 2 different ways: Winehq and wine64 neither of which have worked.

    When I try to launch the server I'm getting an error that says "Wine Mono" is not installed. I'm using a remote server so I can't use a GUI. When I try to use wine uninstall or wine tricks I get an error about Display. I don't have a display.

    How can I fix this?

  • ItzGoomig
    ItzGoomig over 4 years
    How am I suppose to use a Graphical Interface if I only have SSH access to the server?
  • Eliah Kagan
    Eliah Kagan over 4 years
    @ItzGoomig Because, as I have described in detail in this answer, the SSH client has a graphical desktop, and graphical programs running on the SSH server display their interfaces on the client. That's how ssh -X works.
  • ItzGoomig
    ItzGoomig over 4 years
    I tried to setup the X.org thing but it didn't work.
  • Eliah Kagan
    Eliah Kagan over 4 years
    @ItzGoomig Can you give more details about specifically what you attempted to do and what went wrong? In particular, if the SSH client machine doesn't have an X server, you should set one up on it--was that what you were trying to do that didn't work? If so, what OS is the SSH client running? (It's okay if the SSH client is not Ubuntu--as you've described the situation, the SSH server is Ubuntu, so I strongly believe this question is on-topic.) In particular, is the SSH client Windows? If so, what version of Windows is it, and what program are you using to connect via SSH? Are you using PuTTY?
  • ItzGoomig
    ItzGoomig over 4 years
    Yes I am using PuTTY. I'm simply just trying to download Wine Mono to run the DayZ server. When I run the server it says that Wine Mono is not installed. When I try to use Wine Uninstaller or Wine tricks I get display errors. When I try to download X.org and start the service it started but then immediately stopped.
  • Eliah Kagan
    Eliah Kagan over 4 years
    @ItzGoomig I recommend installing VcXsrv on Windows. X.org is the X server Ubuntu uses, but neither the SSH server (Ubuntu) nor the SSH client (Windows) benefits from X.org in your situation. An X server on the SSH server would use a display attached to the server, which won't help you. The SSH server must run on the SSH client--your Windows system. It's possible to install X.org on Windows but I don't recommend it, as it's best to use something specifically designed for Windows. I recommend VcXsrv as I'm most familiar with it (I use it on Windows).
  • ItzGoomig
    ItzGoomig over 4 years
    How is that suppose to help me if this is all done on Ubuntu?
  • Eliah Kagan
    Eliah Kagan over 4 years
    @ItzGoomig It's not all done on Ubuntu. You're using PuTTY on Windows. VcXsrv also runs on Windows (go through each step of the wizard). With VcXsrv running, open PuTTY. In PuTTY, go to Connection → SSH → X11, and check the box labeled "Enable X11 forwarding". When you run graphical programs via SSH, they run on the SSH server, which is Ubuntu. But their graphical interfaces appear on the SSH client, which is Windows. For example, here I am running Winetricks.
  • ItzGoomig
    ItzGoomig over 4 years
    Okay, so I've downloaded the MSI from the website, tried to input it with wine uninstaller and it didn't work. I accidentally canceled the dotnet45 and it won't let me reinstall it saying that it's already installed...
  • ItzGoomig
    ItzGoomig over 4 years
    I was able to succesfully able to download dotnet, but I'm still getting a Wine Mono not installed issue. I tried to use the Wine uninstaller to install the msi but it didn't work.
  • Eliah Kagan
    Eliah Kagan over 4 years
    @ItzGoomig Sorry about the delay in replying. If you still need a solution to that and haven't stored important files in your wineprefix, you can delete it and start over. If you haven't made a custom wineprefix, it's the .wine subdirectory of your home directory. The . makes it a "hidden" directory, but you can see it with Ctrl+H in a file browser (or ls -a or ls -A). If you delete ~/.wine, Wine recreates it when run again. If that doesn't help or other problems arise, I recommend you edit your question with the details. I'll try to read it and help, but someone else may help first.