Installing and running Trainz at Linux, here Ubuntu 24.04 LTS noble

ek.skirl

Active member

P.S. The possibly more uptodate informations you will find in the Wiki:​


The idea​

This is a very old idea and often discussed. I searched for a systematic instruction, but I didn't find one. So I tried to test it and how it runs. Here's my personal systematic for Debian based Linux systems.
For my knowledge such systems aren't able to execute windows programs (*.exe) out of the box. We need some helper apps. In my case I will use WineHQ from an external repository.

Install WineHQ​

A useful instruction to do so is here (in German):ubuntuusers.de Wine Fertige-Pakete in sub chapter "Methode 2 - Wine-Fremdquelle". Maybe you want to use this script:
Code:
sudo dpkg --add-architecture i386     # Nur auf 64-Bit-Systemen notwendig.
sudo mkdir -pm755 /etc/apt/keyrings   # Ab 22.04 nicht mehr nötig.
sudo wget -nc -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ "https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -c | grep -o '\w*$')/winehq-$(lsb_release -c | grep -o '\w*$').sources"
sudo apt update
sudo apt install --install-recommends winehq-stable
The following chapter handles the installation of Trainz instances. The paths in the later following scripts are based on a collecting folder "Wine" in $USER.

Download and unpack the Trainz install files​

After downloading the full installer zip files
  • TANE-SP4-Offline-Installer-105766.zip
  • TRS19-SP4-Offline-Installer-114800.zip
  • TRS22-Offline-Installer-126273.zip
  • TrainzPlus-Offline-Installer-128486.zip
and unpacking it into the sub folder looks like this:
Code:
$HOME/Wine/TRSDL/
+-- TANESP4_105766
|   +-- ...
|   +-- install.exe
|   +-- ...
+-- TRS19PE_114800
|   +-- ...
|   +-- install.exe
|   +-- ...
+-- TRS22PE_126273
|   +-- ...
|   +-- install.exe
|   +-- ...
+-- TRSPLUS_128486
    +-- ...
    +-- install.exe
    +-- ...

Install the Trainz instances​

We install every Trainz instance in its own wine prefix. The install statements of the following scripts create the wine prefixes ".TANESP4", ".TRS19PE", ".TRS22PE respective ".TRSPLUS" as hidden same named folders.
Every installation process creates two links at the desktop. I don't currently know the purpose of the link with the purple circle and a white arrow. The launch link for the Trainz instance with a Trainz icon and a small red dot with a white cross is blocked. By right-clicking it and using the "Allow launching" entry, it will be possible to launch Trainz.
Maybe you want to use one of this scripts to install a Trainz instance:
Code:
#!/bin/bash
#===============================================================================
# Installation of TANESP4 in Wine on Ubuntu
#-------------------------------------------------------------------------------
WINEPREFIX=$HOME/Wine/.TANESP4 wine $HOME/Wine/TRSDL/TANESP4_105766/install.exe
#===============================================================================
Code:
#!/bin/bash
#===============================================================================
# Installation TRS19PE in Wine on Ubuntu
#-------------------------------------------------------------------------------
WINEPREFIX=$HOME/Wine/.TRS19PE wine $HOME/Wine/TRSDL/TRS19PE_114800/install.exe
#===============================================================================
Code:
#!/bin/bash
#===============================================================================
# Installation TRS22PE in Wine on Ubuntu
#-------------------------------------------------------------------------------
WINEPREFIX=$HOME/Wine/.TRS22PE wine $HOME/Wine/TRSDL/TRS22PE_126273/install.exe
#===============================================================================
Code:
#!/bin/bash
#===============================================================================
# Installation TRSPLUS in Wine on Ubuntu
#-------------------------------------------------------------------------------
WINEPREFIX=$HOME/Wine/.TRSPLUS wine $HOME/Wine/TRSDL/TRSPLUS_128486/install.exe
#===============================================================================
Good luck and have fun!

P.S. The possibly more uptodate informations you will find in the Wiki:​

 
Last edited:
You might want to read this thread.

 
@JCitron Of course, but there are 175 posts and all the knowledge is hidden bitwise inside of these texts as well as some try and error infos. So it is very time consuming reading all this, searching for the bricks and then building a house. So I decided to bring this in some systematic form and then share my insides.

P.S. The three parts app folder, data folder and the redirect map text file are used in the same way as on windows systems. So if you decide to move the two folders you have set their new paths inside the profile text file. The fitting profile text file has to stay in its installed place.
Linux path of the build folders and the redirect map text files is in case of post #1
Code:
$HOME/Wine/.TANESP4/drive_c/users/$USERNAME/AppData/Local/N3V Games/TANE/
$HOME/Wine/.TRS19PE/drive_c/users/$USERNAME/AppData/Local/N3V Games/trs19/
$HOME/Wine/.TRS22PE/drive_c/users/$USERNAME/AppData/Local/N3V Games/trs22/
$HOME/Wine/.TRSPLUS/drive_c/users/$USERNAME/AppData/Local/N3V Games/trs22/
But the entries inside the fitting redirect map text files is based on the drive name of windows system
Code:
"c:/tanesp4" "C:/users/%USERNAME%/AppData/Local/N3V Games/TANE/build xxxxxxx"
"c:/trs19pe" "C:/users/%USERNAME%/AppData/Local/N3V Games/trs19/build xxxxxxx"
"c:/trs22pe" "C:/users/%USERNAME%/AppData/Local/N3V Games/trs22/build xxxxxxx"
"c:/trsplus" "C:/users/%USERNAME%/AppData/Local/N3V Games/trsplus/build xxxxxxx"
xxxxxxx is the random character string created by Trainz while installing and (VERY IMPORTANT!) the folder separators have to be slashes "/" but not backslashes!.
 
Last edited:
I understand and that's the nature of a forum. You can create a Trainz wiki page on this if you want to save people from doing an Easter Egg hunt for information. Anyone with a My Trainz login is allowed to contribute to the Wiki.

 
copy and paste the actual text on the Wiki because you can use bullets and other formatting a lot easier than the forums
Really? Hm. Thats different in my eyes.
But its right, that we need write less signs to formate text. ;):coffee::coffee::)
besides it also is more professional than a link
Only besides. But after that there are two texts that have to be kept in sync and up-to-date. So I prefer the link inside the wiki.
Another advantage, in my opinion, is that adjustments can be discussed more effectively in the forum. And if the information in post #1 is updated, this seems like a good and practical solution. Admittedly, it seems unusual and takes some getting used to for many forum users. And discussions in the wiki are generally very rare.

But now my generally question: Is my way a style fault that have to be corrected in the sense of the forum respective wiki rules?
 
Really? Hm. Thats different in my eyes.
But its right, that we need write less signs to formate text. ;):coffee::coffee::)

Only besides. But after that there are two texts that have to be kept in sync and up-to-date. So I prefer the link inside the wiki.
Another advantage, in my opinion, is that adjustments can be discussed more effectively in the forum. And if the information in post #1 is updated, this seems like a good and practical solution. Admittedly, it seems unusual and takes some getting used to for many forum users. And discussions in the wiki are generally very rare.

But now my generally question: Is my way a style fault that have to be corrected in the sense of the forum respective wiki rules?
I agree with John, paste the text in to wiki and keep that up to date. Forum is best for discussion not documentation. Besides, searching for anything on the forum is a nightmare. :)
 
I would copy and paste the actual text
paste the text in to wiki and keep that up to date
So please have a look into the wiki (https://online.ts2009.com/mediaWiki...g_Trainz_at_Linux:_Debian_based_Distributions). I copy&pasted in two versions. So there is a lot of work to do after C&P to change it to the wiki format. So please be understand me, I'd like to stay in my version. C&P and some small changes isn't all to do as you can see.

My personal workflow isn't really helpfull writing for the wiki. My longer posts I prepare in Google docs to be able to write every where I am with every device I have yet. And from there C&P is very much more easy into the forum but the wiki.

Of course I change it back a little bit later in the wiki. May be I try to change my workflow a little bit in time to change the writing destination.
 
So please have a look into the wiki (https://online.ts2009.com/mediaWiki...g_Trainz_at_Linux:_Debian_based_Distributions). I copy&pasted in two versions. So there is a lot of work to do after C&P to change it to the wiki format. So please be understand me, I'd like to stay in my version. C&P and some small changes isn't all to do as you can see.

My personal workflow isn't really helpfull writing for the wiki. My longer posts I prepare in Google docs to be able to write every where I am with every device I have yet. And from there C&P is very much more easy into the forum but the wiki.

Of course I change it back a little bit later in the wiki. May be I try to change my workflow a little bit in time to change the writing destination.
Maybe @pware can help you with this. He's written many articles on the wiki.
 
The forum is definitely a better place for discussions than the Wiki (which is not designed for that anyway) but the forum can be "all over the place" with conflicting information, a confusing mixture of writing styles, and frequent wandering off into unrelated topics and places. This post, for example, has nothing to do with running Trainz on Linux.

For presenting instructions (information, references, tutorials, etc) the Wiki is clearly the winner over the forums - and I have used both for those purposes over the years. The Wiki is easier to keep up to date because all the information is on a single "page" or "document" (if those paper based terms still have any meaning on the Web) not scattered through countless posts some/many of which will not be yours and therefore cannot be edited.

A lot of my time on the Wiki is spent updating - adding bug warnings when new bugs appear, removing them when they are fixed, adding the new features after an SP release, etc, etc. These types of changes need immediacy that is best done in a single document, not scattered throughout numerous posts. Some users have told me that they print my wiki documents (some of which exceed 50 paper sized pages) which would be extremely difficult if not impossible to do with forum based information.

The Trainz Wiki does have a basic guide to setting up your first Wiki page at https://online.ts2009.com/mediaWiki/index.php/HowTo/Create_a_Help_Page and further information on the syntax and vocabulary of the Wiki "language" can be found at https://www.mediawiki.org/wiki/Help:Formatting#. I use a combination of Wiki syntax and HTML coding (especially HTML tables) in my Wiki pages but just using the Wiki syntax with no HTML is perfectly workable.
 
Last edited:
O.k. The Council of Wise Men has spoken. ;):cool: I will do so.
Although I still believe that you can create a thread in such a way that you only have to keep the first post (#1) up to date and include the notes.

But that's not really more important than a majority of users with different design views.

It's OK for me.


P.S. Done. And was half the job it looked first. :);):cool:

 
Last edited:
Although I still believe that you can create a thread in such a way that you only have to keep the first post (#1) up to date and include the notes.
The problem there is that some people (at least this is how I always do it) will click on the link that takes them directly to the last post in a thread, not to the first where they will have to wade through a (possibly) large number of older posts (sometimes going back years) to find the latest discussions. My experience anyway.
 
The problem there is that some people (at least this is how I always do it) will click on the link that takes them directly to the last post in a thread, not to the first where they will have to wade through a (possibly) large number of older posts (sometimes going back years) to find the latest discussions. My experience anyway.
Oh yes that's a great disadvantage I didn't have in mind. An it is the storm wind that blows my personal wall down. :coffee:;)
 
Why are you re-inventing the wheel, or in this instance explaining to others how to get Trainz up and running on Linux when others have already done a fairly good job and the majority of the work for you, which they in turn are already keeping up to date. To save yourself a lot of effort now and in the future perhaps all you really have to do is bring it all together.

On your web page after a short explanation of what WINE is and why it is needed it for running Trainz on Linux why not just link out to the Wine web pages. On its website, WINE ( https://www.winehq.org ) provides a link to its download page ( https://gitlab.winehq.org/wine/wine/-/wikis/Download ) where step-by-step instructions can be found on how to install Wine on the most common core Linux distributions, i.e. Ubuntu, Debian and so forth, which unlike your own proposal would address a number of distributions and more than one version of each of those. Also included are the instructions for the respective specific repositories for the different versions of the chosen Linux distribution, enabling them to remain updated once installed.

Once Wine is installed and the computer rebooted all that is need then is to run winecfg in the terminal to open the Wine Configuration utility. Right click on the icon which appears on the task bar and select Create Shortcut to create a menu entry for the utility which in the future can be used to tweak Wine.

Next, and again in the terminal run wine .wine/drive_c/windows/explorer.exe to open the Windows Explorer. Likewise right click on the icon on the task bar and select Create Shortcut to also add this to the menu.

That's it, Trainz can now be installed as if in Windows. Open Windows Explorer, right click on Trainz.exe and follow the instructions as most members have lost count of how many times they have done previously.

It might be worth explaining in a few additional notes that when using Windows Explorer, Windows is installed on Drive C:/ and Linux on Drive Z:/ Using a Linux file manager and after showing hidden files, Linux is navigated about Home/ and Windows about Home/user name/. wine/drive_c/ . While this may seem irrelevant and perhaps unnecessarily confusing Windows does not have a download folder and any downloads found at /home/user name/Downloads.

Your efforts are appreciated and I hope this will perhaps give you a few ideas to reduce the workload. Peter
 
Last edited:
Why are you re-inventing the wheel, or in this instance explaining to others how to get Trainz up and running on Linux when others have already done a fairly good job and the majority of the work for you, which they in turn are already keeping up to date.
Because I didn't found yet a low knowledge and compact tutorial. May be my old eyes overlooked them.
So please add the links to "reinvented" things please.
Your efforts are appreciated and I hope this will perhaps give you a few ideas to reduce the workload. Peter
Workload? Shortest: Install WineHQ if isn't yet, Download the Trainz install file. Execute a terminal statement. Where there is much workload?
Of course you should only use the Trainz version you want and not all of them. May be that this the Workload you want to express?
 
Sorry I do sincerely apologies. I was of the impression you were in the process of creating a simple universal 'go-to' web page with the instruction on how to install Trainz on any Linux of choice preferable without having to spend too much time in the future frequently updating it. It seems I have completely misunderstood. My intentions with this in mind were only to try and help you, and for this I do apologies. Peter
 
My intentions with this in mind were only to try and help you, and for this I do apologies.
This is confusing me a little bit. Why apologising for a try to help?

All at all I'm not bad with you and it is everytime a great thing to get helpfull hints. Thanks for that try.
It seems to me that I missunderstood you too, may be because of my bad english in understanding some language sounds between the lines and in the deeper meaning of words and wordgroups in practical use of colloquial language.
 
Back
Top