Running the Garmin G430/G530 simulator in Ubuntu
The plane that I've been doing my flight training in is equipped with a Garmin G530. Despite being very outdated, this is a common all-in-one avionics computer found in many general aviation aircraft.
I wanted to practice with my unit for a few hours, but it wasn't realistic for me to do this at the flight school. Instead, I turned towards a simulation of the real thing. First, I tried using X-Plane, but the G530 unit it has is an incomplete facsimile. So I found myself switching to the simulator program that Garmin releases instead.
These are ancient Windows programs, and I no longer have a Windows PC. Thankfully, I found a way to run it on my Linux machine. It required a little bit of finagling, though, so I wanted to document what I did here.
Instructions
Install Wine
The first step is to install Wine on your computer. Follow these instructions.
Then run winecfg and change the default Windows version to Windows XP, and confirm with the "OK" button.
Switch to X.Org
If you're using Wayland (running echo $XDG_SESSION_TYPE will tell you) then you will need to switch to X.Org instead. Otherwise, I just couldn't find any way to make the app work.
You can change this permanently by editing /etc/gdm3/custom.conf, but you don't need to. Instead, just restart your computer, click your profile, but before logging in select the gear icon in the bottom-left corner and press "Ubuntu on Xorg".
After doing this, echo $XDG_SESSION_TYPE should print x11 instead.
Install the simulator
First, download the simulator from garmin. Installing it is a two-step process.
Step one: run wine ~/Downloads/500SeriesSimulator_601.exe (change the path, if necessary, to point to your download). This will open up a zip extractor. I recommend pointing it to C:\users\<your linux username>\Downloads to keep things tidy. Press "Unzip" and exit the program.
Step two: actually run the installer with wine ~/Downloads/SETUP.exe. Just press "Next" until it completes. Then exit all the windows.
Run the simulator
Getting the program to actually run required a little bit more configuration. We have to use env - to clear out the existing environment variables, and then plumb the two we actually need. This is what I ended up with:
cd ~/.wine/drive_c/Program\ Files\ \(x86\)/GARMIN/GARMIN\ 500\ Series\ Trainer
env - DISPLAY=$DISPLAY HOME=$HOME wine GNC500WT.EXE
Note that we first cd into the directory. This is important for getting the test databases to load in correctly.
With that, you should see the Garmin Simulator in all of its glory!