Playing in Linux

Revision as of 23:40, 3 November 2025 by Iritscen (talk | contribs) (added instructions for installing .NET – how did things ever work without this step?!; the AEI should be launched directly, not with the AEIU; documented windowing glitches that I'm seeing with the AEI in Wine; linked to Troubleshooting for issues related to the Windows EXE)
If you are looking for help running Oni on the Steam Deck, see Playing on the Steam Deck for much simpler instructions.

There is no official support for Oni in the Linux OS family. Nevertheless, it is still possible to run the Windows version of the game on Linux using Wine. The Anniversary Edition Installer can be made to run as well.

Manual approach

Rather than using a Wine management GUI such as Lutris or Bottles, you may want to do it yourself by working directly with Wine (this is also a fallback if those tools do not work for you).

A: Installing the needed packages

Wine
A compatibility layer for running Windows applications on a Linux machine.
Open a Linux terminal and tell your package manager to search for "wine32". (You will need to know what your package manager is: apk, apt, dnf, emerge, pacman, yum, zypp…). The package might be called "wine32", "wine.i686", etc. If you don't see such a package, you may need to enable 32-bit architecture with a command such as (in Ubuntu) sudo dpkg --add-architecture i386 followed by sudo apt update, then search again. In order to install Wine, the package manager may also need to install a ton of dependencies if this a fairly new Linux install, but it will probably not take too long.
Winetricks
A helper app for configuring various parts of Wine-created compatibility environments.
In some distros, Winetricks is installed alongside Wine itself, however it usually needs to be installed as a separate package, so search for "winetricks" and install it if it hasn't already been installed.
A legacy Java Runtime Environment offline installer for the 32-bit (aka x86) version of Windows XP
You'll need this for installing the Anniversary Edition, if you want it (the game can be patched to run without installing the AE; this is covered under step D1).
The maximum compatible version is 7u65. An installer for 7u25 is archived here. You'll learn what to do with this file when you reach step B4.

B: Preparing the Wine prefix

1. Open a Linux terminal and create a new Wine prefix (an instance of the Wine compatibility environment) with these commands:

export WINEARCH=win32
export WINEPREFIX=/full/path/to/prefix (where you want the prefix to be stored, e.g. "~/Documents/Wine/WinXP"; the game itself can be installed somewhere else on your hard drive – this is just the compatibility layer for it; the directory you enter here will be created when you run the next command)
winecfg

2. This creates a 32-bit Wine prefix in the requested folder and opens a "Wine configuration" GUI tool. In the GUI tool, under the "Applications" tab, change the target Windows version to "Windows XP" and click "OK".

3. Still in the same terminal (with all the export symbols defined), tell Winetricks to execute the necessary configuration changes:

winetricks corefonts msacm32

4. If you're going to install the AE: Still in the same terminal (with all the export symbols defined), use the "cd" command to navigate to the folder with the Java Runtime Environment installer. Install the JRE into the given Wine prefix like this (assuming the installer is named "jre-7u25-windows-i586.exe"):

cd /full/path/to/JRE/installer
wine jre-7u25-windows-i586.exe

When the Java Setup app appears, simply proceed with the default destination folder.

5. The "WinXP" Wine prefix is now ready. Remember that, in order to run either Oni or the AE Installer, the path to this prefix file must be specified (exported). If it is not specified, then the Wine session will use a default prefix file, one which is probably set to represent 64-bit Windows 7 or 64-bit Windows 10 (which is quite sensible for most applications, but unfortunately not good enough for Oni). See step E for details.

C: Installing Oni

Skip to the next section if you have an existing installation of Oni.

1. Mount the disk image for the Oni CD-ROM, or insert your CD-ROM into the disc drive.

2. Open a Linux terminal, export the "Oni" prefix you created in step B1, navigate to the folder with the contents of the mounted CD, and initiate the installation process:

export WINEPREFIX=/full/path/to/prefix
cd /path/to/Oni/CD (you may have to open the CD in your file manager to see its path, e.g. /run/media/[user name]/001228_1801/ or /media/[user name]/001228_1801/)
wine onisetup.exe or wine OniSetup.exe (the capitalization of the EXE varies)

3. During the installation process, it is recommended to NOT place the game inside the prefix file's compatibility environment folder (that is, do not place it anywhere on the faux "C:\" drive that the installer presents). Instead choose an appropriate place somewhere in your Linux machine's directory tree. The computer's native directory tree should be mapped by default as a different faux drive (usually "Z:\"). This maintains a distinction between the Wine prefix used to run the game and the game itself (you might want to re-use this prefix for other games, or try out other prefixes for this game). It also makes the game directory easier to access in the Linux file explorer when performing operations like step D1 (if you choose to go that route).

4. Oni should install without problems. When GLSetup runs and offers to install OpenGL, make sure to say "No". Creating a desktop shortcut is also pointless because you will need to create your own shortcut that uses Wine (see step E). When the installer closes, you can eject the Oni CD-ROM or un-mount the disk image.

5. Don't bother trying to run the game yet. An attempt to run an unpatched copy of Oni on a modern system is almost guaranteed to fail. The game needs to be patched via the Daodan DLL or the AE, so choose your path below: D1 or D2 (they are inter-compatible, so you can both patch your base install of Oni with the Daodan DLL and also install the AE on top of the base install to get a second copy of the game which is patched and also contains mods).

D1: Patching Oni with the Daodan DLL

The Anniversary Edition is not required in order to provide the patch that Oni needs in order to run on modern systems. The AE makes it possible to installs mods in Oni, but the patch comes from the Daodan DLL, an independent fan creation which the AE automatically installs. Go to the Daodan DLL article and follow the manual installation instructions, substituting the standard path given there for Oni (C:\Program Files\Oni\) for the one you picked in the installer in step C3.

D2: Patching Oni with the AE

a: Installing the AE

This is a rather straightforward process which builds on a vanilla Oni installation.

1. In a terminal, run the command winetricks without any arguments. This will open the GUI. First choose "Select the default wineprefix". On the next screen, choose "Install a Windows DLL or component". When presented with a long list, scroll down to the "dotnet" section. The AE requires .NET 2.0, so select dotnet20. When Microsoft .NET Framework 2.0 Setup appears, proceed through the installation normally. You will return to the Winetricks GUI, which you can exit.

2. Download the latest Windows version of the AE Installer, linked from Anniversary Edition.

3. Open a Linux terminal, export the "Oni" prefix, navigate to the folder with the AE Installer, and initiate the installation process:

export WINEPREFIX=/full/path/to/prefix
cd /full/path/to/folder/with/AE/Setup
wine Anniversary-Edition-Setup-vXX.YY_ZZ.exe

4. During the AE installation, there will be a prompt to provide Oni's installation directory. Navigate to the appropriate directory. Your Linux system's directory tree should be mapped to "Z:/". Don't bother to create Start Menu or desktop shortcuts, as you will not see them.

5. At the end of the installation, the AE Installer Updater will be automatically executed and will attempt to fetch the current AE Installer. During the fetching process, it may appear that the Updater has hanged, but this is because the initial part of the fetching process takes the longest.

6. The Updater will launch the Installer. When the Installer launches, there is also no visual indication that there is work being done in the background as the AEI talks to the Mod Depot, so be patient.

The progress dialogs for updating and installing the AE may have a glitch under Wine where they hide behind the AEI's main window, but they are still present and working. The Instructions window which presents tips for using the AEI may also be glitched, presenting as a tiny title bar only. Close the tiny window and proceed to choose some mods if you wish. You can leave all mods turned off, but you do have to click the Install button at least once.

b: Running the AE Installer

The AE Installer will be automatically launched after it is installed. However, any other time you want to launch the AE Installer, open a Linux terminal, export the "Oni" prefix, and navigate to the folder with the AEInstaller2.jar file (starting from Oni's folder, this is AE/AEInstaller/bin/). Launch the .jar file through your Wine prefix's Java Runtime Environment:

export WINEPREFIX=/full/path/to/prefix
cd /full/path/to/folder/with/AE/Installer
wine start /ProgIDOpen jarfile AEInstaller2.jar

E: Launching patched Oni

There are two possible ways to launch Oni:
1. Launch the game through the AE Installer application if you installed the AE using the process in D2(b).

2. Open a Linux terminal, export the "Oni" prefix, navigate to the folder with the patched Oni.exe file, and launch it via Wine:

export WINEPREFIX=/full/path/to/prefix
cd /full/path/to/folder/with/patched/Oni/EXE
wine Oni.exe

As a shortcut, you can place the above commands into a shell script and then create a desktop file which executes the script (make sure to set both the .sh and .desktop files as executable).

Troubleshooting

Gunfire kills the frame rate

Some users experience a large drop in frame rate when certain actions occur such as firing a gun. This is a sound-related bug which indicates that you didn't follow step 3 under "Preparing the Wine prefix" :-) Make sure to install msacm32 with winetricks.

Sound stutters so badly that it's mostly inaudible

This was only observed happening in Linux running inside of a VM, specifically Fedora Linux. The audio server, pipewire, does not allow enough headroom for the latency that comes with virtualization. This can be fixed by making a user-level copy of the config file:

mkdir -p ~/.config/wireplumber/main.lua.d
cp /usr/share/wireplumber/main.lua.d/50-alsa-config.lua ~/.config/wireplumber/main.lua.d

…and then editing ~/.config/wireplumber/main.lua.d/50-alsa-config.lua to change this portion of the file as follows:

 ["vm.node.defaults"] = {
   ["api.alsa.period-size"] = 2048,
   ["api.alsa.headroom"] = 16384,
 },

You may be able to get by with the numbers 1024 and 8192, but if that doesn't work, try raising them to the above figures. Unfortunately, the higher the numbers, the more delayed Oni's sound will be.

Any other problems

Note that because you are running a Windows application, the problems which crop up in Windows Oni can happen here too. See Troubleshooting § Windows for further issues and their solutions.