Terraria

Terraria

Not enough ratings
Fixing the Terraria 1.4 Linux Launch Bug
By ManaPool
This is a quick guide on how to get Terraria up and running on your distribution of Linux by overcoming a quick bug. There is a terminal and GUI walkthrough on how to fix the problem.
   
Award
Favorite
Favorited
Unfavorite
Overview
The Problem

The Debian release of Terraria has a small bug that makes it impossible for the game to launch. It's a simple fix that can be done in two ways; Through the terminal, or through whatever GUI you're using. This guide shows how to fix the problem using terminal commands and a terminal-based text editor.

The simple description of the problem is an improper TERM environment variable value that causes the error for the wrong Magic number of 542. It causes Terraria to fail it's boot process, appearing to stop immediately after starting.

All that needs to be done is to insert an extra line of code to correct the TERM environment variable in the Terraria and TerrariaServer launch scripts.

My System Information
    Distribution - Ubuntu 20.04 64 Bit
    GUI - Gnome 3.36.2 (X11 Window System)
Terminal Commands
To fix this issue through the terminal, you will need to navigate through your files with the cd command, and view hidden files with the ls -a command option to find the proper directories if you ever get lost. Then you'll need to open the Terraria and TerrariaServer launch scripts with some form of a text editor to insert the line of code to get everything to work. The text editor I'll be using in this demonstration is Vim.[en.wikipedia.org]
Navigating to the Proper Directory
First, you'll need to find the directory containing the Terraria and TerrariaServer launch scripts. For me, all I needed to do was use this command to move from my home directory:

cd ~/.steam/debian-installation/steamapps/common/Terraria

Then you can list the files in the directory with

ls -a

You should an output that looks something like this:



Editing the Launch Scripts
If this is what you got, then you're now in the proper directory. All you need to do now is open the launch scripts with whatever text editor you use. In my case, I use the commands:

vim Terraria
vim TerrariaServer

The contents of these scripts should look something like this (use the cat command to view the contents of each file):


All you need to do is start a new line at the top of the script (I chose underneath the first three lines of comments) and type in this line of text:

export TERM=xterm

Once you've done that, save your changes and proceed to do the same thing for the TerrariaServer script (Both should look similar and have similar contents). Then attempt to launch Terraria, and it should boot up normally.
Other Information
It's possible this fix won't work for everybody, so if it doesn't, I would keep searching for a solution elsewhere as I'm not exactly active in the guide-making scene. It's also possible the changes you make to the Terraria and TerrariaServer script files will be reverted upon updating the game, verifying the integrity of the game's files, or reinstalling it. Expect the possibility of this problem occurring again in the future.
3 Comments
CSA Necromancer Jun 5, 2024 @ 4:01am 
Thanks a lot. The solution worked both on my Mint 21.3 and on my Steamdeck.
JheziFox Nov 25, 2021 @ 8:56am 
Sigo con problemas para iniciar un servidor, pero al menos el tema de iniciar el juego se arreglo, espero no tener otro problema, pero al menos ayudo en algo. 10 dias buscando tutoriales y este es el unico que minimamente me ayudo, GRACIAS <3:ScoutSheep:
PisauraXTX Sep 6, 2020 @ 2:05pm 
This solution didn't work for me unfortunately, but thank you for this guide anyway.