This repository contains two ways to get the native Linux version of Total War: SHOGUN 2 working again on modern Ubuntu-based distributions:
- Automatic script method (recommended) — one command, mostly automated.
- Manual method — step-by-step build instructions for people who want full control.
Tested on:
- Linux Mint 22.1 / 22.3
- Ubuntu 22.04 / 24.04
- Should work on most Ubuntu-based distributions
Modern Linux systems break the old native SHOGUN 2 build for several reasons:
- W^X kernel enforcement (
mprotectissue) - Missing old OpenSSL libraries
- Missing old libcurl symbols
- Removed GConf libraries
- glibc 2.34+
dlopencompatibility issues
This repository rebuilds/provides the missing compatibility pieces.
Because the game depends on OpenSSL 1.0.2:
SEGA servers require modern TLS support that OpenSSL 1.0.2 does not have.
Single-player works. If you want multiplayer just use Proton
This is not the best way to play the game , i did this out of curiosity.
Before using either method:
- Steam must be installed as the native
.debversion (NOT Flatpak)
Also:
- SHOGUN 2 must be installed with linux-pre-2022-update
- In Steam → right click game → Properties → Game Versions & Betas
- Select:
linux-pre-2022-update
And:
- Compatibility tab → make sure Proton / Steam Play is off!
The easiest method.
The script:
- installs required packages
- builds all compatibility libraries
- copies required game files
- prints the correct Steam launch options
git clone <YOUR_REPO_URL>
cd <YOUR_REPO_NAME>Or simply download the files manually.
chmod +x shogun2-native-fix-v2.sh./shogun2-native-fix-v2.shThe script will:
- Build
libc_mprotect.so - Build OpenSSL 1.0.2
- Build libcurl 7.40
- Build a libgconf compatibility stub
- Install required 32-bit packages
- Copy
private_symbol_hack.so - Print the exact Steam launch option to paste
You can also run specific phases manually.
./shogun2-native-fix-v2.sh --phase 1./shogun2-native-fix-v2.sh --phase 2./shogun2-native-fix-v2.sh --phase 3./shogun2-native-fix-v2.sh --phase 4./shogun2-native-fix-v2.sh --status./shogun2-native-fix-v2.sh --diagnose./shogun2-native-fix-v2.sh --dry-runAfter the script finishes:
Paste the line printed by the script.
- Make sure Steam is running
- Click Play
- The Feral launcher should appear
- Click PLAY
Use this if you dont trust me :(
Tested on Linux Mint 22.1/22.3 and Ubuntu 22.04/24.04.
sudo apt install gcc gcc-multilib make wget perl pkg-config build-essential \
libgl1-mesa-dri:i386 libgl1:i386 libc6:i386 \
libopenal1:i386 libnss3:i386 libnspr4:i386 \
libsdl2-ttf-2.0-0:i386 libgdk-pixbuf-2.0-0:i386 \
libxss1:i386 libxtst6:i386sudo apt install libgtk2.0-0:i386sudo apt install libgtk2.0-0t64:i386Find your driver version:
nvidia-smi --query-gpu=driver_version --format=csv,noheaderExample:
595.71.05
Install the matching 32-bit GL package:
sudo apt install libnvidia-gl-595:i386mkdir -p ~/.local/share/shogun2-native-fix/lib32
mkdir -p ~/.local/share/shogun2-native-fix/srcModern kernels block writable+executable memory. SHOGUN 2 still expects it.
Create the source:
cat > ~/.local/share/shogun2-native-fix/src/libc_mprotect.c << 'EOF'
#define _GNU_SOURCE
#include <sys/mman.h>
#include <unistd.h>
#include <sys/syscall.h>
int mprotect(void *addr, size_t len, int prot) {
if (prot == PROT_EXEC) prot |= PROT_READ;
return syscall(__NR_mprotect, addr, len, prot);
}
EOFCompile:
gcc -m32 -shared -fPIC -O2 \
-o ~/.local/share/shogun2-native-fix/lib32/libc_mprotect.so \
~/.local/share/shogun2-native-fix/src/libc_mprotect.cVerify:
file ~/.local/share/shogun2-native-fix/lib32/libc_mprotect.soExpected:
ELF 32-bit LSB shared object, Intel 80386
The game needs old sonames:
libssl.so.37libcrypto.so.36
These no longer exist on modern Ubuntu.
Download:
cd ~/.local/share/shogun2-native-fix/src
wget -O openssl-1.0.2u.tar.gz \
https://ftp.nluug.nl/security/openssl/openssl-1.0.2u.tar.gzExtract:
tar -xzf openssl-1.0.2u.tar.gz
cd openssl-1.0.2uConfigure:
./Configure linux-elf shared no-asm \
--prefix="$HOME/.local/share/shogun2-native-fix/openssl-install" \
--openssldir="$HOME/.local/share/shogun2-native-fix/openssl-install/ssl" \
-Wl,-rpath="$HOME/.local/share/shogun2-native-fix/lib32" \
-Wl,-z,noexecstackBuild:
make depend
make -j$(nproc) \
CFLAG="-Wno-error -fPIC -m32 -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -Wall"Copy libraries:
cp -P libssl.so* libcrypto.so* ~/.local/share/shogun2-native-fix/lib32/Create old soname symlinks:
cd ~/.local/share/shogun2-native-fix/lib32
ln -sf libssl.so.1.0.0 libssl.so.37
ln -sf libcrypto.so.1.0.0 libcrypto.so.36cd ~/.local/share/shogun2-native-fix/src
wget -O curl-7.40.0.tar.gz https://curl.se/download/curl-7.40.0.tar.gz
tar -xzf curl-7.40.0.tar.gz
cd curl-7.40.0Configure:
OPENSSL_SRC="$HOME/.local/share/shogun2-native-fix/src/openssl-1.0.2u"
LIB32="$HOME/.local/share/shogun2-native-fix/lib32"
CFLAGS="-m32 -I$OPENSSL_SRC/include" \
LDFLAGS="-m32 -L$OPENSSL_SRC -Wl,-rpath=$LIB32" \
LIBS="-ldl" \
./configure \
--prefix="$HOME/.local/share/shogun2-native-fix/curl-install" \
--with-ssl="$OPENSSL_SRC" \
--disable-static \
--enable-shared \
--host=i686-pc-linux-gnuBuild:
make -j$(nproc)Copy libraries:
cp -P lib/.libs/libcurl.so* ~/.local/share/shogun2-native-fix/lib32/cat > ~/.local/share/shogun2-native-fix/src/gconf_stub.c << 'EOF'
#include <stdlib.h>
void gconf_client_get_default(void) {}
void gconf_client_get_bool(void) {}
void gconf_client_get_string(void) {}
void gconf_client_get_int(void) {}
void gconf_client_get_list(void) {}
void gconf_client_get(void) {}
void gconf_client_set_bool(void) {}
void gconf_client_set_string(void) {}
void gconf_client_set_int(void) {}
void gconf_client_add_dir(void) {}
void gconf_client_remove_dir(void) {}
void gconf_client_notify_add(void) {}
void gconf_client_notify_remove(void) {}
void gconf_entry_get_key(void) {}
void gconf_entry_get_value(void) {}
void gconf_entry_free(void) {}
void gconf_value_free(void *val) { free(val); }
void gconf_value_get_bool(void) {}
void gconf_value_get_string(void) {}
void gconf_value_get_int(void) {}
void gconf_init(void) {}
void gconf_error_quark(void) {}
EOFCompile:
gcc -m32 -shared -fPIC -O2 \
-o ~/.local/share/shogun2-native-fix/lib32/libgconf-2.so.4 \
~/.local/share/shogun2-native-fix/src/gconf_stub.ccp ~/.steam/debian-installation/steamapps/common/"Total War SHOGUN 2"/lib/private_symbol_hack.so \
~/.local/share/shogun2-native-fix/lib32/Verify:
file ~/.local/share/shogun2-native-fix/lib32/private_symbol_hack.soExpected:
ELF 32-bit LSB shared object, Intel 80386
ls -la ~/.local/share/shogun2-native-fix/lib32/Expected files:
libc_mprotect.so
libcrypto.so -> libcrypto.so.1.0.0
libcrypto.so.1.0.0
libcrypto.so.36 -> libcrypto.so.1.0.0
libssl.so -> libssl.so.1.0.0
libssl.so.1.0.0
libssl.so.37 -> libssl.so.1.0.0
libcurl.so -> libcurl.so.4.3.0
libcurl.so.4 -> libcurl.so.4.3.0
libcurl.so.4.3.0
libgconf-2.so.4
private_symbol_hack.so
In Steam:
- Right click SHOGUN 2
- Properties
- General
- Launch Options
Paste:
SteamAppId=34330 GameAppId=34330 GAME_LAUNCH_PREFIX="env LD_LIBRARY_PATH=/home/YOUR_USERNAME/.local/share/shogun2-native-fix/lib32:../lib/i686" LD_PRELOAD="/home/YOUR_USERNAME/.local/share/shogun2-native-fix/lib32/private_symbol_hack.so:/home/YOUR_USERNAME/.local/share/shogun2-native-fix/lib32/libc_mprotect.so:/home/YOUR_USERNAME/.local/share/shogun2-native-fix/lib32/libcurl.so.4.3.0:/home/YOUR_USERNAME/.local/share/shogun2-native-fix/lib32/libssl.so.1.0.0:/home/YOUR_USERNAME/.local/share/shogun2-native-fix/lib32/libcrypto.so.1.0.0" %command%
Or auto-generate the correct line:
LIB32="$HOME/.local/share/shogun2-native-fix/lib32"
echo "SteamAppId=34330 GameAppId=34330 GAME_LAUNCH_PREFIX=\"env LD_LIBRARY_PATH=${LIB32}:../lib/i686\" LD_PRELOAD=\"${LIB32}/private_symbol_hack.so:${LIB32}/libc_mprotect.so:${LIB32}/libcurl.so.4.3.0:${LIB32}/libssl.so.1.0.0:${LIB32}/libcrypto.so.1.0.0\" %command%"- Start Steam
- Launch the game
- The Feral launcher should appear
- Click PLAY
If the game crashes:
tail -50 ~/.steam/debian-installation/logs/console_log.txtrm -rf ~/.local/share/shogun2-native-fix/Then remove the Steam launch option.
No system files are modified beyond installed apt packages.