Playing in Linux
- 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 i386followed bysudo 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 below).
- The maximum compatible version is 7u65. An installer for 7u25 is still hosted here.
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=win32export WINEPREFIX=/full/path/to/prefix(where you want the prefix to be stored, e.g. "~/Documents/Wine/Oni"; 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/installerwine jre-7u25-windows-i586.exe
5. The "Oni" 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/prefixcd /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.exeorwine 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 an Oni installation.
1. Download the latest Windows version of the AE Installer from the Oni Mod Depot (click here).
2. 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/prefixcd /full/path/to/folder/with/AE/Setupwine Anniversary-Edition-Setup-vXX.YY_ZZ.exe
3. 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 "/".
4. At the end of the installation, the AE Installer will be automatically executed and will attempt to fetch updates. During the fetching process, it may appear that the AE Installer has hanged, but this is because there is no visual indication that there is work being done in the background. Be patient.
5. Remember to follow the instructions within the AE Installer which tell you to hit the Install button at least once, even if you don't select any mods to install.
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, navigate to the folder with the AEInstaller2Updater.jar file, and launch the .jar file through Wine Java Runtime Environment:
export WINEPREFIX=/full/path/to/prefixcd /full/path/to/folder/with/AE/Installerwine start /ProgIDOpen jarfile AEInstaller2Updater.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.
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/prefixcd /full/path/to/folder/with/patched/Oni/EXEwine Oni.exe
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.dcp /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.