Skip to content

Craven's Bike Site

TrackMania Linux Setup Tricks

7m Reading time, 1291 words.

I install Trackmania United Forever through Steam, though most of this works via Wine with the correct Wine Prefix stuff set (can't remember how I did that, might update later)

I use Proton 9, though the latest has been working best since Proton 7.

The launch parameters are PROTON_USE_WINED3D=1 WINEDLLOVERRIDES="dinput8.dll=n,b" %command%

Standalone update

Before all the stuff I install the standalone version of the game into the Steam install folder (if you already install the standalone don't worry about this). Install Steam normally, run it once (will need the launch paramater PROTON_USE_WINED3D=1 else it won't launch, or might be upside down) and then grab the standalone installer from here TMUF or here for TMNF.

Install that with regular Wine, and have the install directory be the Steam install dir (SteamLibrary/steamapps/common/TrackMania United/). This should just follow the regular install. If you intend to use Steam do not tick the desktop, start menu, or tmtp link options at the end (we'll fix those later). If you're using standalone through Wine then these options might be useful for you.

You may need to put in a CD key at the end of this install, or the next time you launch. The first launch after installing standalone should be with the Trackmania Launcher (TmForeverLauncher.exe or Steam -> Properties -> General -> Selected Launch Option -> Ask When Starting Game -> Trackmania United Forever Settings. On second launch once you know it's good you can set it to not ask again, and just have it as Play Trackmania United Forever)

Modloader Install

After setting the game up normally I install the Trackmania Competitive Patch through ModLoader. You can try to use the proper modloader via Wine (the regular download, or the zip version) but I have the best luck with the "prepackaged zip". It is harder to use and set up, but it works for me. I have in the past updated versions of the coremod and comppatch dll files with the zip version, by extracting it and copying the dlls over the old ones. (versioning is very hard with this setup as the Windows based zips don't have creation dates). The prepackaged zip gets updated from time to time, but not super regularly.

If this has worked properly then the title of the window should be "Trackmania Modded Forever"

To enable and disable mods you can add them to the ModLoader.ini file. Follow the instructions in that file. ; to comment, and the name of the mod doesn't matter (only the file name, case sensitive, needs the bit after the dot(.))

(if you have any tricks for making the regular modloader work on Linux, let me know and I'll update what's what here, a lot of people report that it just works)

Twinkie install

Twinkie 2.0 self extractor/installer doesn't work, so use 7z x Twinkie.exe (replace twinkie.exe with whatever that file is called fully)

That'll extract folders to the folder you're in, you want database/TmForever/products/Twinkie/$_2_/ and to copy all the dlls in there to the same place you put the dlls for CoreMod, CompPatch, Unlimiter, whatever

Take the $DOCUMENTS/Twinkie folder and put it in SteamLibrary/steamapps/compatdata/7200/pfx/drive_c/users/steamuser/Documents/ (if you didn't know already, that's where the TrackMania folder is that saves and maps go into.

There seems to be some bug where installing it causes the game to always launch in launcher mode for me, that seems to be fixed by re-extracting the Modloader pack.

It always launches with TMInterface, which if you have CompPatch will crash instantly (can't have both) so you'll need to delete the TMInterface.dll, or move it to a different folder somewhere else so it can't be ran.

Updating other mods

You can download the other mods directly from somewhere, ask a friend to extract the DLL, or probably get the modloader exe, install it, and grab the dlls from there. Then overwrite the ones in the main TMUF directory, and if needed add them to the ModLoader.ini

To update mods I got the proper modloader installed and opened it, then navigated to /home/$user/.wine/drive_c/users/$user/Local Settings/Application Data/TMLoader/database/TmForever and then database/TmForever/products where all the mods are. You'll have to download newer versions from within the program (if you can't do this, ask friends to send it to you).

Copy all the dlls from the version you want and put them in the place with the rest of the mod dlls. You may need to check the description.yaml file for any dependancies of the mod.

Your millage will vary for how well this works. For me replacing CoreMod with CoreMod it broke, so make a backup before you try.

Making the play button work on TMX for Steam

If you use Steam then the play button on TMX doesn't always work when linked directly to the game. It'll work if you run the game through Wine outside of Steam, but for half these tricks to work Steam makes things a lot easier. I run a script to make things work. It requires the xclip package to work. If you're on wayland replace this with wl-copy and install that package.

tmtp-getter.sh

#!/bin/bash
echo $1 | xclip -selection clipboard

(if the above shows as a white box and you're using the dark theme on this site, either try selecting the text in the box blindly, or swapping to the light theme. If it works fine, I've fixed it somehow) I put this file into my Documents (or wherever you want to put it that might be cleaner for you), then on Firefox I run the info from this mozilla article for adding a custom URL handler (doing it the proper way via the about:config doesn't seem to always work, but this does)

data:text/html,%3Ca href="tmtp%3Atest.com"%3E%26lt;tmtp:test.com%26gt;%3C/a%3E

Then set the file to run to the tmtp-getter.sh (make sure it's executable with chmod +x tmtp-getter.sh)

From there you should be able to click the "play track" button on TMX and have it copy the manialink to the clipboard.

Other little things

If you too are a multi monitor user and are annoyed that the game minimises when you unfocus it, and that it doesn't respect the SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 command (because it doesn't really use SDL) then installing the ModLoader exe is great. If you launch it fullscreen, then shrink to windowed, and maximise it back to full screen then it stops minimising when you click away :D

Symlinking the user data folder to a more easily found place. I run this command from my ~/Documents folder to create a TrackMania symlink there. You want the folder in documents to be the symlink so Steam still controls the actual data. Replace the first section with my /mnt/Storage3/... with wherever your Steam Library is.
ln -s /mnt/Storage3/SteamLibrary/steamapps/compatdata/7200/pfx/drive_c/users/steamuser/Documents/TrackMania TrackMania

Using triggers in game

TMUF/NF doesn't allow analogue triggers at all, so I use Steam Input to rebind them to number keys letting me use them as camera binds (you can rebind them to anything you want). I also rebind the Dpad buttons to the arrow keys so I can have digital turning if wanted. There have been times where Steam Input doesn't recognise the controller at all, so if that happens just turn it off.

Anything else

If you know of any other tricks or tips then let me know so I can add them to here at some point