Touhou Linux Guide

By Daichungus

This is the guide for the Windows era games. The PC-98 era Touhou guide is here.


Disclaimer

This guide focuses on using the following Wine* runtime managers for a relatively straightforward and consistent experience.

It does not cover:

The goal here is to get most users running their Touhou games without too much headaches.

If you're looking for more advanced or alternative methods, other resources may be better suited.

* The regular version of Wine may not always work for your system, so this guide touches on alternate Wine versions as well.


Preparing your Linux environment

Choosing a distro

Skip this section if you already have chosen your distro.

Most major distros and desktop environments should work well with this guide.

The author's only recommendation is to choose a well-known, widely-supported, and stable distro, which includes but is not limited to the following:

The latest version of this guide has been personally tested by the author for the following Linux distros:

Tested distros in past versions of this guide include Linux Mint 22.1 - 22.2 and Ubuntu 24.04; some steps may still be the same for newer versions of these distros but have not been tested yet.

Installing required software

Before continuing, ensure you have the necessary graphics drivers and system firmware installed.

Consult your distro's documentation or other online resources for a proper setup (e.g., RPM Fusion for Nvidia drivers on Fedora, multilib repo on Arch, etc.).

In addition, both Lutris and Heroic have Flatpak versions available as well. Consult the official quick setup guide if Flatpak is not already installed on your system.

Lutris

Debian/Ubuntu/Linux Mint

sudo apt install wine lutris

Fedora

sudo dnf install wine lutris

Arch Linux

sudo pacman -S wine wine-mono wine-gecko lutris

Flatpak

flatpak install flathub net.lutris.Lutris

Heroic

Flatpak (recommended)

flatpak install flathub com.heroicgameslauncher.hgl

AppImage and Others

See the Heroic downloads page.

Useful tools

Not strictly necessary for running the games, but can help with adding games or configuring settings.

Winetricks and winecfg

Helps with adjusting systemwide Wine settings and installing some Windows components

winetricks and winecfg should be able to installed through your distro's default package manager.

Flatseal

Allows you to edit the permissions of Flatpak programs installed of your system. This is particularly useful if the program does not have access to user files by default.

flatpak install flathub com.github.tchx84.Flatseal

ProtonUp-Qt

Graphical manager of GE-Proton runners installed system-wide.

flatpak install flathub net.davidotek.pupgui2

† If you want to use a newer version of Wine, consider adding the WineHQ repo to your package manager.


Installing THCRAP patches

Skip to this section if you do not want to play with THCRAP patches, or if you already have THCRAP patches installed and do not want to install more.

If your Touhou game folders each have their own thcrap folders and English executable, it is recommended to delete those duplicate folders and executables, and follow this section instead.

Please note the following:

Setting up Wine and Mono for THCRAP

  1. Create a new Wine prefix* with the following command:

    WINEPREFIX=$HOME/.wine-thcrap WINEARCH=win64 winecfg
  2. Download the latest version of Mono.† Use this guide to find the version you need.

  3. Run the following command to install Mono to your newly-created prefix:‡

    WINEPREFIX=$HOME/.wine-thcrap wine /path/to/wine-mono-VERSION-x86.msi

    (substitute the actual version number for VERSION)

* Though it may seem redundant, this helps reduce the likelihood of issues when different Wine versions are used with the same prefix.

† The THCRAP configuration tool requires .NET, which Mono substitutes on Linux. Otherwise it will display an error saying that .NET is missing.

‡ Directly installing Mono to the prefix can help avoid unforseen distro-related issues. If you have wine-mono installed system-wide, THCRAP might only display a pink screen before closing itself.

Setup of the THCRAP configuration tool

  1. Download the main THCRAP package from thpatch.net

  2. Unzip the package. There are two ways to do this:

Using Lutris

  1. Open Lutris, click "+" sign in the upper-left corner, then choose "Add locally installed game"

  2. In the Game Info tab:

    1. Set a name like "THCRAP configuration tool".

    2. Choose Wine as the Runner.

  3. In the Game options tab:

    1. Set the executable path to /your/path/to/thcrap/thcrap.exe*

    2. Set the working directory path to /your/path/to/thcrap/

    3. Set the Wine prefix path to $HOME/.wine-thcrap

  4. Use your desired Wine version for the Runner option.

  5. Press the save button and ensure the THCRAP configuration tool runs properly.

* thcrap.exe is the THCRAP configuration tool, which allows you to download new patches and locate the games. Meanwhile, thcrap_loader.exe is the actual program that applies patches to the Touhou games.

Using the command line

Use the Wine prefix you created for THCRAP earlier. Run:

WINEPREFIX=$HOME/.wine-thcrap wine /your/path/to/thcrap/thcrap.exe

Installing patches with the THCRAP configuration tool

  1. Run the THCRAP configuration tool via Lutris.

  2. On the welcome screen, click next. By default, THCRAP will ask you to choose a patch based on your system's default language.

  3. Click on the "All patches" tab* if you want to:

  4. THCRAP will then ask you for the location of your games† after you click "next".

    1. Select the "Find games in a specific folder" option.

    2. Navigate to the folder containing your Touhou games.

    3. THCRAP will then load a list of detected Touhou games and their custom.exe programs.

    4. Select the games you want to apply the patch to. Click Next.

  5. Choose the most convenient location for the patch's shortcut‡ to be created in.

  6. You can now run your Touhou game with the installed patch.

* It may take a few seconds for the patch list when you click on the "All patches" tab. This is normal behavior.

† It is highly recommended that the thcrap folder be placed in the same directory as your Touhou games.

‡ This shortcut is purely optional, as what actually matters is the config file created for that patch. You can delete the shortcut if desired.

Understanding and editing the config files

Config files tell thcrap_loader.exe which patches to load in order. These are located in the config folder of the thcrap folder ending with .js

Here are some examples of config files for various patches:

If you have already have installed a few patches, this can be very useful for patch stacking.

About games.js

games.js is a special config file. This file tells THCRAP all the known locations of your Touhou games.

An example with explanation comments is provided here.

If you have vpatch.exe in any of the games' folders (see "Running Touhou with Vsync patches"), you can refer to that exe instead of the regular game exe within games.js


Installing Vsync patches (vpatch)

Information about the vsync patches is located here

  1. Download the vpatch archive (old download)

  2. Unzip the vpatch archive. There are two ways to do this:

  3. In the extracted vpatch folder, locate the appropriate vpatch_thXX.dll file for your game.

    Provided below is a table for which vpatch folder to find your game's vpatch

    Name thXX vpatch version .dll filename
    Embodiment of Scarlet Devil th06 vpatch_rev4 vpatch_th06.dll
    Perfect Cherry Blossom th07 vpatch_rev4 vpatch_th07.dll
    Imperishable Night th08 vpatch_rev4 vpatch_th08.dll
    Phantasmagoria of Flower View th09 vpatch_rev4 vpatch_th09.dll
    Shoot the Bullet th095 vpatch_rev7 vpatch_th095.dll
    Mountain of Faith th10 vpatch_rev7 vpatch_th10.dll
    Subterranean Animism th11 vpatch_rev7 vpatch_th11.dll
    Undefined Fantastic Object th12 vpatch_rev7 vpatch_th12.dll
    Double Spoiler th125 vpatch_rev7 vpatch_th125.dll
    Great Fairy Wars th128 vpatch_th12.8 vpatch_th128.dll
    Ten Desires th13 vpatch_th13 vpatch_th13.dll
    Double Dealing Character th14 vpatch_th14 vpatch_th14.dll
    Legacy of Lunatic Kingdom th15 vpatch_th15 vpatch_th15.dll

  4. Copy or move the appropriate vpatch_thXX.dll*, vpatch.exe, and vpatch.ini files into your Touhou game's folder.

  5. Rename the Touhou game's exe† to thXX.exe.

* For EoSD, use vpatch_th06_unicode.dll instead if you want to play with THCRAP.

† For EoSD, you must rename the exe to 東方紅魔郷.exe for vpatch to be applied.


Running the Touhou games

Please note the following:

Skip to "Running from the Command Line" if you want to directly use the system-wide Wine runner and launch the games from your terminal.

Skip to Running with Heroic if you've installed Heroic Games Launcher instead of Lutris.

Running with Lutris

Installing alternate Wine versions

While this guide recommends using your system's latest version of Wine, Lutris does allow you to install alternative versions that may offer a better experience, such as Proton or Wine-GE.

To install them:

  1. Open Lutris settings (≡ in upper-right corner → Preferences)

  2. Search for "wine" in the Runners tab

  3. Click on the "box" icon on the far-right side to open the Wine versions manager

  4. Install your desired version.

Vanilla or Vpatch EoSD

  1. While adding it to Lutris, go to the "Systems options" tab.

  2. Scroll to "Locale" under "Game execution" and set it to Japanese (ja_JP.utf8). You may need to install it on your system beforehand.

Vanilla Touhou (no patches)

Follow this section if you want to play without THCRAP patches or vpatch.

  1. Open Lutris, then add "locally installed game".

  2. In the Game info tab:

    1. Set the name to be the Touhou game's name.

    2. Choose Wine as the Runner.

  3. In the Game options tab:

    1. Set the executable path to /your/path/to/Touhou/thXX/thXX.exe

    2. Set the working directory path to /your/path/to/Touhou/thXX/

    3. Set the Wine prefix path* to $HOME/.wine

  4. In the Runner options tab, choose your desired wine version.

  5. Press the save button and ensure your game is running.

* On some versions of Lutris, this is required for the game to properly start.

Touhou with Vsync patch (vpatch)

  1. Install vpatch for your Touhou game.

  2. Repeat the same first few steps as running vanilla Touhou.

  3. Set the executable path to /your/path/to/Touhou/thXX/vpatch.exe

  4. Continue with the same steps as running vanilla Touhou.

  5. Press the save button and ensure your game is running with vpatch.

Touhou with THCRAP patches

Follow this section if you have installed THCRAP patches.

  1. Repeat the first few steps as running vanilla Touhou, but for the executable path in "Game options", locate thcrap_loader.exe

  2. In the Arguments field, enter the .js file of your patch* and the game† you want to run it with.

    Examples of arguments:

  3. Ensure the working directory is the folder that contains thcrap_loader.exe

  4. Press the save button and run your game for testing.‡

  5. If your game loads with your desired patch, you've succeeded.

* You can find all of your installed patches in the config folder in the thcrap folder.

† Game names are located in games.js within the config folder of the thcrap folder

‡ There should be a small window that has the name "Touhou Community Reliant Automatic Patcher".

Running with Heroic

If you're using the Flatpak version, it is recommended to install and use Flatseal to enable access to wherever your games may be located.

When launched for the first time, Heroic will ask you to connect an account from a supported platform. This is not necessary for this guide.

Using the Wine Manager

On the left side, there is a tab labeled "Wine Manager". Click it to reveal two lists. Each list contains various specific versions of Proton-CachyOS and GE-Proton.

In theory, most of the specific versions of either version of Proton should be able to run most of the Touhou games without much issue.

However, this guide recommends installing the latest version of GE-Proton, since it has been reported by various users to be one of the better supported versions of Wine.

To see all the the downloadable versions of GE-Proton, click on the "GE-Proton" tab near the top of the page. It should be the topmost entry in the list.

Install it by clicking on the rightmost download button in the "Actions" column.

Adding a game

Navigate to Library and click on the ADD GAME button.

Once you enter the name of the game, Heroic will automatically search SteamGridDB for cover art of your game. Note that this may include non-official images being automatically chosen for your game. Otherwise you can choose a local image or another image from SteamGridDB.

Choose Windows for the platform version to install. Expand the Show Wine Settings dropdown bar for more detailed settings.

It is not recommended to use a shared Wine prefix, since it can cause problems if their dependencies conflict with each other.

Likewise, it is best not to change the WinePrefix format (/home/yourname/Games/Heroic/Prefixes/Title by default) in order to keep the process consistent.

You can choose a specific Wine runner under Wine version. The default option should be the best.

The main difference between the various ways to run the Touhou games is largely determined by the Select Executable field.

If the displayed path to the executable contains pseudo-random numbers and letters (not the exact intended path), that means Heroic does not have access to the directory. For the Flatpak version, this can be fixed with Flatseal.

Unless you intend to install from the CD of a Touhou game into one of the Wine prefixes, it is recommended to select FINISH after you have finished adding your game.

Vanilla Touhou (no patches)

Simply enter the path to the game's .exe program.

A solution towards running game with the Japanese locale has not been found for Heroic yet.

Touhou with Vsync patches

Simply enter the path to the location of the vpatch.exe program.

Touhou with THCRAP patches

Enter the path to your thcrap_loader.exe, program. Select FINISH, then right click on the added game's Library entry before choosing Settings.

In the Advanced tab, set the Game Arguments to be example.js thXX, where example.js is your preferred patch or custom patch stack, and thXX is your corresponding game.

Running from the Command Line

Vanilla Touhou (no patches)*

Replace thXX.exe with the executable for your specific game:

LANG=ja_JP.UTF-8 wine start /unix /your/path/to/Touhou/thXX/thXX.exe

Touhou with Vsync patches (vpatch)*

Same as above, but use vpatch.exe instead:

LANG=ja_JP.UTF-8 wine start /unix /your/path/to/Touhou/thXX/vpatch.exe

Touhou with THCRAP patches

Replace example.js with your patch config, and thXX with your game's ID:

wine /your/path/to/thcrap/thcrap_loader.exe example.js thXX

* Due to how EoSD (th06) handles encoding and locale, running it directly from the command line requires LANG=ja_JP.UTF-8 wine start /unix before the path to it.


Backing up your save data

Older Windows (th06 - th12)

All relevant files are located in the same folder as the game.*

* Or technically, wherever the game's .exe was last ran.

Newer Windows (th12.5 - )

Starting with DS (th125), all save data is stored in AppData/Roaming/ShanghaiAlice

  1. Locate* the Wine prefix you used to run the game

  2. Navigate to drive_c/users/yourname/AppData/Roaming/ShanghaiAlice in your Wine prefix

  3. Open the thXX folder that corresponds with your Touhou game(s), then copy or move all relevant files to a safe place.†

* By default, it's located in your home folder as .wine

† It is recommended to copy the files to the location of the actual game for organizational purposes.

Relevant files

Make sure to keep these files safe.

* scorethXX.dat starting with Shoot the Bullet (th095)

† It's normal for the name of EoSD's cfg file to consist of mojibake.


Common Issues

Common fixes

Lutris-related issues can be solved easier by running lutris -d in your terminal.

A common fix is to create a new Wine prefix. For Touhou games after th12.5, make sure to save your important information before deleting the old Wine prefix.

For more information, refer to this guide.

EoSD displays error windows at startup

Refer to this guide for help.

Fullscreen Issues

These two issues usually happen when running the Touhou games with regular/system Wine. Some good alternative runners includes GE-Proton (the default runner in newer versions) and wine-ge (default in older versions). Both should have relatively few issues with the Lutris setup as outlined in this guide.

Not upscaling/in corner

This mainly affects desktop environments that use Wayland.

A list of solutions has been listed on the thpatch wiki.

Stretched out

Typically happens when you enable DXVK in original Wine. Fixes the non-up-scaling issue but also causes stretched visuals with that runner.

Strange text

Missing text/tofu (⍰⍰⍰⍰)

Install cjkfonts using winetricks:

wine winetricks cjkfonts

Mojibake (“Œ•û)

  1. Verify that your system has a suitable Japanese locale
  2. Use the Japanese locale whenever you run Touhou games and installers through Wine via command line.

    Add this at the start of your command:

    LANG=ja_JP.UTF-8

Crusty/Low-quality audio

Try an alternate wine version besides your system's wine version.


Additional Resources and References


Special Thanks

The author thanks the following for their support: