Home > Configuration, Games > Installing Terraria/Steam in Wine

Installing Terraria/Steam in Wine

December 22nd, 2011 Leave a comment Go to comments

Today I had to rebuild my wine-prefix of Steam and re-install Terraria – the main reason to have Steam in the first place :D

The trouble was that I wanted to install Magicka. Magicka runs on .Net Framework version 3.5, while Terraria is using .Net Framework version 4.0. Unfortunately, the version 3.5 didn’t want to install. To be precise: 3.5 wanted to install 2.0 first, which didn’t install because 4.0 was already installed.

So I decided to create a fresh wine-prefix of Steam and install as much of .Net Frameworks as possible to not run into the same trouble later again. If you do not know what a “wine-prefix” is, have a look at the wiki page of winetricks – an awesome tool to make the usual trial & error work in wine much easier.

These are the steps I took. I usually create the prefix first in the default location:

WINEPREFIX=”~/.local/share/wineprefixes/steam” winecfg

This will download the current gecko engine for html rendering and provides the opportunity to set the screen resolution to 120dpi.

Next step is to install Steam itself:

winetricks steam

This will install the Steam client into the prefix I created above. Once that’s done I use winetricks to install a few libraries that I think are useful:


In the GUI that pops up I “select steam (Steam)” and “Install a Windows DLL or component“:


Winetricks will download, extract and install all this stuff for you. So much easier than native Windows :D

This is usually the time I do the first backup of the wine-prefix. Feel free to do so now. Also, Wine should have created a start-menu entry for Steam. Run it now and install Terraria. Do not run/execute Terraria after the installation, though!

Next there is an important order in which to install the whole .Net Framework mess. Most important: Do not install any dotnet1.x!

First via winetricks: first dotnet20, then dotnet20sp2, then dotnet30, then dotnet35.

Then download .Net Framework 4.0 from here. Now, you can’t immediately install it because it would complain that it’s already installed. Weird default registry setting of modern wine. Let’s get rid of that via regedit so we can actually install it:

WINEPREFIX=”~/.local/share/wineprefixes/steam” wine regedit

Browse to HKLM\Software\Microsoft\NET Framework Setup\NDP\v4. Select the HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full node and export it. You will need it later. Then delete the whole v4 node.

Now we will be able to run the .Net Framework 4.0 installer:

WINEPREFIX=”~/.local/share/wineprefixes/steam” wine downloads/dotNetFx40_Full_x86_x64.exe

On first run the setup will fail. On the second run the setup will fail with a different message. If on the third run the setup asks you to repair the installation, it’s exactly what you are supposed to expect and press cancel.

Now it’s time to re-import the Full part. Run regedit again as mentioned above and import the file you saved it to previously.

Next step to get Terraria going is to install Microsoft’s XNA library. You should get the installation file when loading Terraria via Steam. Run it:

WINEPREFIX=”~/.local/share/wineprefixes/steam” wine msiexec /package xnafx40_redist.msi

The installation should run without errors now.

Now, for some reason Terraria cannot find the installed .NET Framework libraries at the place they got installed. You need to manually copy them to the folder which contains terraria.exe. Find the following following libraries in your wine-prefix somewhere and copy them to ~/.local/share/wineprefixes/steam/drive_c/Program Files/Steam/steamapps/common/terraria:


Now you can start Terraria via Steam! You will get a small pop-up with this error message, every time it starts:

ERROR parsing
Parser returned error 0×80004001

Just click OK and Terraria should run fine. First time starting took a bit longer for me (>=1 minute), not sure why. Last time it didn’t.

You could be happy already but then you realize that the sound is terribly delayed. That’s why we installed dsound via winetricks previously. Run winecfg again:

WINEPREFIX=”~/.local/share/wineprefixes/steam” winecfg

Go to the “Libraries” tab, scroll down and “Edit…” the existing overrides for “dsound” and “dswave” to have “builtin, native“.

Now Terraria should really be running fine :-)

Enough for today – Magicka will be next tomorrow!

Note: The sites here and here helped me a lot to get it going in the first place. Thank you!

Categories: Configuration, Games Tags: , ,
  1. No comments yet.
You must be logged in to post a comment.