I've recently installed Ubuntu 22.04 on a new desktop PC (actually an old upgraded and repurposed Chromebox) and wanted to have some games available to play. This thing doesn't have much power, but I figured I could have a few things on hand and as I used to run XCom on a Celeron N4000 with 2GB of RAM I should be able to get it running on this.
Except it wouldn't...
These are the steps I took to fix it. It might be that not all of them are or were actually required. In all honesty if you're following this I would probably go through the steps in reverse order as I wouldn't be surprised to find that the last step fixes everything!
Symptoms
Clicking on "PLAY" from Steam brings up the launcher where I can select XCOM Enemy Unknown or XCOM Enemy Within. Selecting either choice closes the launcher and in Steam I can see the game running, but after a few seconds it stops.
The Fix
In Steam - right click - Browse local files
In file manager - right click - Open in Terminal
In terminal run:
./xcom.sh
This gives the following error:
/home/ryan/Storage/SteamLibrary/steamapps/common/XCom-Enemy-Unknown/XCOMLauncher: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
XCOM - XCOMLauncher returned no game
XCOM - No game launched
Let's get libsdl2 installed properly:
sudo apt-get install -y libsdl2*
And try again:
./xcom.sh
A different error now:
/home/ryan/Storage/SteamLibrary/steamapps/common/XCom-Enemy-Unknown/binaries/linux/../../binaries/linux/game.x86_64: error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory
Let's try installing libopenal:
sudo apt-get install -y libopenal
And try again:
./xcom.sh
Huh, a new error:
XCOM - XCOMLauncher returned Enemy Unknown
XCOM - Launching
szCmd: /bin/sh -c '"/home/ryan/.local/share/Steam/steam.sh" "steam://run/200510"' &
Dumped crashlog to /home/ryan/.local/share/feral-interactive/XCOM/crashes//7b96470c-1b6e-2b1f-2808ea0b-2c744dee.dmp
/home/ryan/Storage/SteamLibrary/steamapps/common/XCom-Enemy-Unknown/binaries/linux/xcom.sh: line 43: 9250 Aborted (core dumped) ${DEBUGGER} "${GAMEBINARY}" $@
To fix this we need to rename some files:
<STEAMDIR>/steamapps/common/XCom-Enemy-Unknown/engine/splash/pcconsole/splash.bmp to OLDsplash.bmp
<STEAMDIR>/steamapps/common/XCom-Enemy-Unknown/xew/engine/splash/pcconsole/splash.bmp to OLDsplash.bmp
Finally we can now launch the game using the PLAY button in Steam! Yay!