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).
ssh -X
works. – Eliah Kagan Nov 15 '19 at 02:10.wine
subdirectory of your home directory. The.
makes it a "hidden" directory, but you can see it with Ctrl+H in a file browser (orls -a
orls -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. – Eliah Kagan Nov 21 '19 at 18:10