Install XTrackCAD on Linux

local_offer
Category
IT

There are several programs available that will help you to plan your railway model layout. One option is XTrackCAD, a layout builder licensed under the GNU GPLv2 that can be installed on Linux, Mac and Windows.

However, the Linux installation instruction from archive were not completely clear to me and it took me more than one attempt to finally install the program. Since I might not be the only one with the same problem, let me guide you through the process.

What you need to know: the installer lets you chose the folder you want to install the program, but it only worked for me when installed in the /usr folder (due to creating the folders bin/ and share/, e.g. /usr/bin and /usr/share and copying all files there). So if I would chose the folder /opt/XTrackCAD for my installation, the folder structure would be /opt/XTrackCAD/bin for the binary and /opt/XTrackCAD/share for all other files. When trying to run the program after the completed installation, it wouldn’t find the necessary files to do so and returned the following error: could not find the program 'xtracad' (even though the installation seemed to be successful).

So, with that in mind, you simply need three commands to install the program:

sudo ./xtrkcad-setup-5.2.2GA-1.x86_64.sh --prefix=/usr
/usr/share/xtrkcad/xtrkcad-setup install /usr/share/xtrkcad
chmod +x ~/Desktop/xtrkcad.desktop

Since you need superuser access to access the /usr folder we run the command as sudo. The --prefix option is there to specify where you want to install the program (which needed to be /usr). If you downloaded a different build version of XTrackCAD, your file will be named differently. Make sure to change the file name accordingly. The second command simply creates the necessary shortcuts and the third command will make the newly created desktop shortcut executable.

That’s it—have fun creating awesome layouts!