Trainz on Linux in 2022

Please note: I`m using my second-hand Win10 laptop at the moment, so most of the following comments are from memory, not from actually checking on thee Linux system. As I`m sure you know already, KUbuntu is Ubuntu, just with a different GUI, and Ubuntu is a DebIan derivative. This should help me some when trying to follow your advice.

I think I have Play on Linux installed.

I`m not familiar with Lutris. I`ll have to see if I can find it in the Ubuntu repository. I know WineTricks and believe that I have it installed. Like you, I don`t know it at all well.

The hardware I`m planning on trying to get Trainz running on is definitely superior to the laptop I`m using now. The test-install mentioned elsewhere was performed on this better machine, and it is also currently my primary Linux machine. My KUbuntu system is installed on a SSD drive that is mounted inside a portable box with a USB cable. The boot partition is installed to a companion thumb drive. My KUbuntu system is therefore very portable. The machine itself contains another SSD. The only real drawback is that the motherboard audio seems to have died. All three have plenty of free space available. I`ve been running KUbuntu exclusively for years, ever since the WinXP that I had been running on my previous system decided to eat the WinXP primary data partition. I`ve been trying to recover data from it, but I`ve lost the NTFS disk-structure document that I was using as a guide to write my own data-recovery tool, and have been unable to complete the tool.

I don`t recall exactly where, but within the last few days I`ve posted about a test-install of Win10 on the internal SSD and the subsequent purging of bloatware. I think that it was in the Suggestion Boxcar thread about creating a Linux-nativebversion of Trainz. As for needing Windows for your content-creation activities, have you tried running those programs on your Linux machine?

I`m something of a minor computer wiz myself, or at least used to be one, also largely self-taught. I`ve been reading about the Content Manager issues. I should be able to create a hot-key to refresh the window with a single multi-key keypress, possibly even a single-key hotkey. As for installing, I can just copy the current install into Linux file-space with a reasonable expectation of it working, no installer needed, plus I get to keep all of my installed content. The biggest problem I can see at the moment is this Lutris thing. I`ll start looking for it when I get a break in the forum activity. I`ll get back to you with the results.

Edit: Yes, I`ve still got that Boxcar thread open and can confirm that the post mentioned above is here.

Edit 2: I see you`ve already Liked it.

Edit 3: No Lutris in the repository.

Edit 4: Corrected an offensive spelling of a brand name.
 
Last edited:
I`m not familiar with Lutris. I`ll have to see if I can find it in the Ubuntu repository. I know WineTricks and believe that I have it installed. Like you, I don`t know it at all well.
Despite feeling somewhat nervous about Lutris to start with I've found it to be easy and trouble free to use and not the problem I thought was going to be.
The main thing that I've used Winetricks for is to install various items of useful Windows software which is a darn sight easier process than trying to use Play on Linux to do it.

As for needing Windoze for your content-creation activities, have you tried running those programs on your Linux machine?
Yes I have and unfortunately most of them refused to work in Linux. The only software programs I use that worked fine in Linux were Sketchup 8 and Irfanview.


What I've found to be the best way to install Trainz is to use Lutris to run the Trainz installer to create a basic clean install. After that I take a copy of the appropriate data folder for that version of Trainz from my archived backup files and paste it into the Wine drive C: that Lutris has created. It's exactly the same process that's used when moving a Trainz data folder to another drive in Windows with directing the new install to make use of an existing data folder rather than the new one it's just created. So yes you can definitely keep all of your installed content without any problems.
 
Thank you. I can confirm that I have all of the above-mentioned Linux packages installed, except Lutris, which I was unable to find in the repository. Where would I get it from?

Once a basic clean install is in place, can other installs be just copied over without running their installers? They could in Windows, I`m sure.

Have you checked your utilities for Linux versions? I don`t know which ones you use, but some of the utilities that I`ve read about other creators using originated on Linux. There are also Linux alternates for many mainstream Windows applications that don`t have Linux versions of their own. Have you considered any of them?
 
Thank you. I can confirm that I have all of the above-mentioned Linux packages installed, except Lutris, which I was unable to find in the repository. Where would I get it from?
https://lutris.net/ Debian Linux had it in its Discover Software Centre so I didn't need to download it from the website.

Once a basic clean install is in place, can other installs be just copied over without running their installers? They could in Windows, I`m sure.
No. I tried this and it doesn't work. In Windows it's possible to copy and paste over an archived complete install, but in Linux you'll need to run the Trainz installers. With Lutris this is very easy to do and I had TANE, TRS19 and TRS22 all installed and running in the same afternoon.

Have you checked your utilities for Linux versions?
I did and no luck. I forgot to mention before that Gimp is available for Linux, - though I don't really like using Gimp all that much and prefer using Paint.NET instead.

There are also Linux alternates for many mainstream Windows applications that don`t have Linux versions of their own. Have you considered any of them?
I couldn't find any Linux software that could directly replace the ones I like to use in Windows. Having to learn how to use new software that couldn't do what I wanted anyway didn't appeal all that much and since I have a fully functional Windows 11 computer I decided to stick with what I know. Windows 11 is a disgusting mess, - but I suppose I can put up with it if I'm only using it for creative work and nothing else.
 
...and I don`t have DebIan in my software sources list. I guess I go to the source directly, then.
No. I tried this and it doesn't work. In Windows it's possible to copy and paste over an archived complete install, but in Linux you'll need to run the Trainz installers. With Lutris this is very easy to do and I had TANE, TRS19 and TRS22 all installed and running in the same afternoon.
Methinks you misunderstood me. I meant alongside the existing install, not over top of the existing install. Ah well, iff`n it doesn`t work, the installer`s the way to go.

I mentioned the Gimp myself, just not by name. "Linux origins" stuff. At any rate, I have no intention of needing any of those programs. I`ll stick to the simple stuff, like scripting.

Yah, I mostly put up with it only because most of my favorite games don`t run anywhere else, and I haven`t been able to make them run anywhere else. Too much bloat not of my own choosing.

--

Anyway, I`ll be back after I`ve found this Lutris thing.

P.S.: Did you catch the edits at the end of my previous post?

Also, I just remembered something I`ve got to add to that Suggestions thread on Linux. Look for it.
 
Methinks you misunderstood me. I meant alongside the existing install, not over top of the existing install. Ah well, iff`n it doesn`t work, the installer`s the way to go.
My poor grammar. When I said 'copy and paste over an archived complete install' I meant copy the archive across to the Linux computer, not copy over another installation of Trainz.

P.S.: Did you catch the edits at the end of my previous post?
Yes I did.
 
Just to be perfectly clear, I meant to copy a second, third, etc., into the same fake-Windows environment, sharing the same framework, but in a separate install directory. This is your current understanding, correct? ...and you`re saying that it will not result in two working installs of Trainz?

All of `em? Four edits to message #41.

Lutris is downloaded and installing....installed, and has finished its own post-install update, and is now downloading a WinXP32 runtime package for the Sims 3 test-install I`m trying to do.

Edit, Edit 2, Edit 3: Status update.
 
Last edited:
Fail.

The game supposedly installed correctly, but apparently didn`t install at all. There was what appeared to be a crashed-program alert from Windows XP during the install attempt. I`m now going to purge that broken install from Lutris and try again with Trainz and a Win10 environment. To do this, I`ll have to go off-line for a temporary hardware reconfiguration. I`ll be back when I can.
 
Sorry but I've been away from Trainz for a few days and only just catching up with this thread, so in no particular order. My preferred Linux is Mint and have used it for work for quite a few years. In respect of Trainz likewise I use Mint, not that I think its any better but I try out generally a different version of Linux every week both new and updated versions and there seems little to choose between them, each tend to have their pros and cons, and hence I'm still looking.

When it comes to Wine, Lutris and so on I've learnt not to install them from within the host Linux but from the respective web sites via the Terminal. This way not only do you get the latest version but they are kept up to date for that particular Linux. With the exception of probably Pop OS these programs are not the priority of the majority of distributions when it comes to updates.



If you download the full version of Trainz and unzip somewhere suitable, once Wine is installed, reboot the computer and right click on the respective installation .exe select the suggested install utility and follow the instructions as you would if working in Windows. Again reboot as you would with Windows and run Trainz for the first time. I think in the past year I've only had two no goes and both were in quite new/unknown versions of Linux

Wine and Lutris can be used separately but Trainz work better with a few files found in Wine which are not in Lutris so even if you intend to use Lutris I would suggest you install Wine first. The big advantage of Lutris is the ability to select the version of Wine you use. I recall some have had issues with some Wine versions in the past and the ability to swap versions with a few mouse clicks is quite handy. The other advantage of Lutris is the ability to tinker with settings, admittedly still a big learning curve but worth a try.

When it comes to alternatives for Windows programs can I suggest the following website:


This coming weekend I'm going to tinker with 'Wubuntu' (Windows Ubuntu) the latest version of LinuxFX which clones the user interfaces of Windows 10 and 11 and of cause he ability to run Trainz. I'll keep you updated. Should you try it yourself, once downloaded, rename the file removing any reference to 'Win' in the name, as Windows ISO files are written to USB drives in a different manner to other ISO's and it confuses such utilities in Linux and the likes of Rufus in Windows.

Peter
 
@wilts747, that is an excellent summary/reply for the last few posts. Incidentally, Lutris actually includes instructions to be sure that your distribution`s Wine is installed before installing Lutris. It also says to be sure that Vulkan is installed before Lutris, but I don``t recall as it specified the source of the installed Vulkan. In KUbuntu, there are several packages with Vulkan in their names, some of which I found to be already installed. I have no clue which ones I need to have installed, but apparently it matters, as Vulkan was mentioned in the WinXP program crashed dialog that popped up during the test-install of Sims 3.

I have copied the Trainz install files into Linux filespace, but apparently do not have sufficient space to copy over the trainzbases at the moment. I will have to copy them separately, apparently. Inspecting the aftermath of trying to copy them, I find two directory entries that cannot be anythinged, and apparently the two TrainzBases together exceed 130.63 gigabytes of required storage space.

I will return my Linux to the other hardware and run a test install of Trainz. If it works, I will uninstall it, uninstall a test-install of Windows on the hardware`s internal SSD, reformat for Linux (I`ve been meaning to install LVM volumes there, not sure now if I will), and install Trainz there, after which I will retrieve my trainzbases. Creating a tar archive of them will eliminate the slack space from the copy, but will it be enough without compression? Many of those files are already compressed, so compression may not help much. To do this, I will need to go off-line again. I`ll be back with results.
 
Lovely. Just absolutely lovely. In no particular order:
  • The NTFS volumes on my KUbuntu SSD are apparently "locked" by Windows. Huh?
  • No Windows install I have is currently authorized to have left them in a "locked" state.
  • I don`t know how to force-unlock them.
  • My Home partition apparently does not have enough space to install Trainz.
  • Lutris does not give me the option to choose where I want to install the game.
  • I have a couple files on one of my partitions that apparently have corrupted i-nodes, and I`ve forgotten what command to use to get rid of them.
  • I`ve got plenty of unpartitioned disk space available. One SSD has 171.81 gig of unpartitioned space, and the other not only has 853.49gig of unpartitioned space, it has a 64.00 gig partition that contains a test-install of Win10 that I could free up and another 50,00 gig partition that looks to have been created for the personal use of said Win10 install.
  • All that glorious space, and I can`t tell Lutris to use it without engaging in some trickery.
  • I`m tired and want to put my thinker off-duty for a while.
  • In @frogpipe`s immortal words, as paraphrased by me, I feel like a "druck alf". Perhaps I`ll dump core.
I think I`ll take a nap and think about this some more tomorrow.
 
I'm afraid i'm lost with all this and really don't understand what is going on. All I know is that I correctly installed Wine 9.0 and then Lutris and now TANE, TRS19 and TRS22 are running better than they ever have before. I can't explain why or how, but I know it does.
It's our Summer here and I'm no good in Summer when it's hot like this as I'm a lot more sleepy, - so I can't brain because I have the dumb.

Peter is the one who knows what is going on with Trainz and Linux and is the forum expert on such matters. He has certainly pointed me in the right direction when it comes to running Trainz in Linux.
 
I`m feeling better after having a nice rest overnight. I`ll prepare one of those unpartitioned spaces (as a normal partition) and arrange for Lutris to use it for its game directory. It should be plenty big enough. As for the other things, I`ll deal with them later. I`ll let you know how it goes with the Trainz install. I can do that without going off-line here, but copying the trainzbases is another matter; I`ll have to go off-line for that.

Edit: After one or two false starts, I`ve got the free space formatted and mounted where Lutris expects to install games, and I have Lutris supposedly "installing game data", but all I see in the window is a "spinner". Waiting.

Edit 2: OSError("Invalid Wine prefix path /home/###/Games/trains22pe, make sure to create the prefix before saving to a registry")
Looks to me like an error thrown by the Python internals of Lutris. Trying to see if it is anything I can fix.

Edit 3: I manually created the missing directory and tried again. Same error message. This time, my manually-created directory was gone after the failed install.

Edit 4: I manually created the missing directory again, and this time I copied the installer into it. This time the installer is at least running. The only other time I saw that was when the installer said that I didn`t have enough space to install. That time I did not have the installer copied into the target directory. Confused. Waiting.
 
Last edited:
Still confused, but no longer waiting. It appears that it installed successfully, despite complaints that Vulkan support isincomplete.

Iclicked on the Launch Trainz button in the installer, and a window flashed briefly. The Trainz install window is gone (as expected), but the Lutris install window is still open. Investigating. The game directory containing the Trainz install is still there. The Trainz install directory is in Programs, as expected, and populated. The Trainz user-data folder is present in the expected location, and populated.

The only way to close the Lutris install window is to press the Abort button. Doing this leaves the game environment intact, but without the Trainz icon in the main window that another (failed) attempt left.

I`m going to try "Import previously installed Lutris games".

Didn`t work. Trying a "fresh install". This time I will NOT "Launch game now".
 
It worked, sort of. I launched the game with Lutris` Launch Now button on its own install window, and the game launches, and opens its own window.

What is in that window is a surprise. It informs me that patches are available, with the only options being to install the patch or close the window. Naturally I choose the install patch option. The window changes to an Online Patch window, with the following contents:
  • "Patches will be installed to the following folder".
  • "To continue, click next. If you wish to select a different folder, click Browse."
  • An editable text widget containing "No target selected."
  • A button "Change Targets..." (note: not "Browse"). This opens up a directory selection browser.
  • A button "Next" that is disabled.
I have never (that I recall) seen this in my native install, and my native install shown no indication of having updates available, and no indication of how I might check for them. After quitting and restarting the native install, the same.

What should I do in my Linux install?
 
It sounds in some respects that you are making life hard for yourself. You only need to install Linux, and let it update itself, reboot and install Wine again followed by a reboot. Copy a fresh download of Trainz into the Download folder, decompress, right click on the install file and let Linux do the rest. Unlike Windows, Linux does it better without intervention, there is a logic to where it installs things but after many years I still frequently get lost. If you intend to use Lutris use the Trainz desktop shortcut properties to find where Trainz is installed.

Linux will remind you itself if there are updates to be had but there is a lot to be said for not fixing what is not broken, the exception being if you are using dedicated graphics you may want to check the drive for an update. Many Linux distributions have a bespoke utility to do that for you. Peter
 
Thamk you, Peter. I was hoping you would chime in as another person I know said that you were one of the Linux experts here.
Given the current state of that machine, I shall exit Trains, exit Lutris, restart the computer, restart Lutris, and try to restart Trainz. I`ll be back in a few with the results.

Meanwhile, I was responding to failures, not inventing problems. I have no need to install Linux, because Linux is working well. I have no need to install Wine, as it too was already installed with no updates available. I did install a version of Wine that appeared to be labeled for 64-bit applications, making two installed versions of Wine, one for 32-bit clients and one for 64-bit clients, both apparently correctly installed. I downloaded and installed Lutris because that was recommended. Lutris downloaded and installed its own customized version of Wine as well. I tried to install Trainz, but the install failed. I tried several other things until one of them worked, except when I launched the program as part of the install, that failed as well, leaving Lutris unwilling to admit that the game had installed. I then tried again, not launching the game until Lutris acknowledged that the game had installed. When it ran, the dialog that I described above appeared, and I have no idea how to respond to it. I also know perfectly well where Trainz is installed, having already viewed the contents of the program directory and the data directory. Until that dialog window opened giving me a question that I was unable to answer, everything I did was a response to a failure, with no-one giving me any advice on how to deal with it. The game is installed, but at this point I cannot use it, aand at each step, I performed what seemed at the time to be the most logical thing to try next. Debugging is like that. I know, because I program.

I don`t mean to sound like I`m criticizing your attempt to help; I`m just trying to explain where I am now and how I got here as succinctly as I know how while still including any details that even might be relevant.

Can you please give me advice based on where I am now? Thank you.
 
Now it`s even worse. I double-clicked the icon in the Lutris window, and all I get for my effort is a "bouncing" icon in the Lutris window. Selecting Lutris`s Show Logs option pops up an empty window. When I close the Lutris window, I find an error dialog that was hiding behind it. From the dialog:
The file /home/###/Games/trainz22pe/Program Files/N3V
Games/Trainz Railroad Simulator 2022Trainz22PE/Patch
Installer could not be found
Recommendations?

Edit: It turns out that rebooting did /not/ remount the Games directory. I fix that, /and/ fix it so that it never happens again, and run Trainz, and I get dumped back at the dialog that I described above.

Does ANYone know what that dialog is all about?
 
Last edited:
Ok, while testing an idea on my Windows machine for something in another thread, I discovered the information I need.

Only now the Online Patch window is sitting there like a lump, with little to zero network traffic. Is this a Linus issue or a Trainz issue?
 
Last edited:
You say Linux works and you have installed two versions of Wine, which makes me ask how to you know Linux works and how can you tell that you haven't over written one version of Wine with the other and unintentionally damaged both. The reality is that you probably can't tell, because that single missing system file is only used by Trainz and that one utility you have yet to need. You may also be making things worse by trying to use Lutris, which I only suggested to KotangaGirl because she was having issues with a Wine update and had said that the previous version she had used for her install worked better.

I have been playing with Wubuntu this morning and although a large distribution still took only 4 minutes to install from a USB2 port to a 8 year old very slow SSD. I would therefore suggest for the time it takes, you may care to do the same. Once installed, use the backup utility (I think in Ubuntu it may be Deja DuP, its Timeshift in Mint) to create an initial recovery point. Then run a system update and make coffee while your waiting. Once finished reboot and again run a system backup. When complete run the 'Software and Updates' utility not the Software Updater, choose the Additional Drivers tab from which you can update or install missing drivers. I agree its all long winded and may take an hour but you now have something to play with and build on and should it go wrong get back to the starting point in a few minutes.

Now install Wine. As I said previous my preference is from the WineHQ website, links above, for your specific distribution but each there own, and either way once completed again reboot. To install Trainz, preferably have the installation media uncompressed on the SSD where you intend to install it because using anything below a USB 3.0 or above port its a major bottle neck when installing such a large program as Trainz.

Right click on the install file and choose the Windows installer option, usually the first option on the list. Follow the instructions and again make coffee, this morning it took twice as long to install Trainz as it did installing Wubuntu and all its updates. Once complete again reboot and run Trainz for the first time as you might in Windows remembering to give it time to build the database and so on. Assuming it works, and before you download endless routes again perform a system backup if for no other reason to save reinstalling should it go wrong from this point forward.

If it doesn’t work I would download a free Windows program, larger the better, such as LibreOffice and install it in exactly the same manner as a test piece and depending on the results reconsider the options. Lutris may be one but I can’t ever recall installing any version of Trainz through Lutris which hasn’t run on Wine beforehand. Thinking positive, and it does work, you may ask the question do you actually need any additional programs such as Lutris.

Peter
 
Back
Top