ATS

Running TruckBooks in Linux

While ATS/ETS2 is Linux native, the VTC software TrucksBook isn't. This article explains it is still possible.

4 min read
Running TruckBooks in Linux
Photo by Robson Hatsukami Morgan / Unsplash

In my downtime, one game that I play is ETS2. A mate of mine, who also streams on Twitch, has set up a Virtual Trucking Company in TrucksBook.

While ATS/ETS2 has native Linux binaries that can be installed through Steam, TrucksBook is Windows only. However, through the awesomeness of Bottles/Wine, we can run windows binaries. This article will go through the process and see if it is possible and how well it works.

Setup

If you haven't installed Bottles, it is a great way to manage WINE instances through a GUI, and has all sorts of ways to make the process easy. As the best way to install and keep up to date is through FlatPak, you may need to enable that in your Linux OS or install it. As I use Manjaro, it was an option to turn on. Then you can find it in the OS App Store.

Either use an existing Bottle, or create a new one for this purpose.

Creating a new Gaming Bottle

Go to Installers and install Steam unless you are doing this in an existing Gaming bottle with Steam. Installers in Bottles are manifests of known working configurations and their necessary dependencies.

Partial list of the Bottles Installers that set up known dependencies

Once installed, run Steam. Whether this is necessary for stability or not, this installer manifest sets the 'no-browser' option, and opens it as the 'minigameslist'.

Install ATS or ETS2

Download the Trucksbook installer and decompress from the zip file.

Run the installer

The path should appear to the game .exe. Select it and continue through the installer.

At first it would not run, this is usually due to missing dependencies. I started with the Visual C++ Redistributables as they are usually the issue, and the installer also mentioned it would attempt to install them (not sure if this works properly in WINE or requires seperate installation). I found the wiki for it, and found that it requires .NET 4.0. Unfortunately this wasn't quite correct. It still would not run. Going further, I installed .NET 4.5 and now it runs.

However, when I open ATS and start a job, it jumped back to the Trucksbook app (RIP my truck as it crashed into a wall...) displaying this error.

However, I just left the message there and kept going on the job. I finished the job, and it still recorded the job. It somehow duplicated a job and had an old job in the list. However, as we can see it is sent to the server.

We can verify as it shows in the website.

As the error message is annoying, if you close it it pops back up, I had a look at what it means. and I found this in a StackOverflow post.

Following APIs were added in .NET Framework 4.6; from release notes:

Support for converting dates and times to or from Unix time

The following new methods have been added to the DateTimeOffset structure >to support converting date and time values to or from Unix time:

  • DateTimeOffset.FromUnixTimeSeconds
  • DateTimeOffset.FromUnixTimeMilliseconds
  • DateTimeOffset.ToUnixTimeSeconds
  • DateTimeOffset.ToUnixTimeMilliseconds

So I installed the .NET 4.6 dependency in Bottles and it now runs without the error.

For some reason Bottles is duplicating the Steam and TB Client programs in their list (will investigate why and how to resolve later). To ensure that your trips are tracked, run the TB Client program from this bottle, and it will load up, login and then you can run ATS/ETS2.

TLDR

Next step is to start this again in a fresh bottle with this knowledge to work out the minimum dependencies to run. This article will be updated in this seperate section with the details. I only noticed after doing this initial discovery that there is versioning states in Bottles that I will use to test different dependencies.

Me on Mastodon - This link is here for verification purposes.