Skip to content

Instantly share code, notes, and snippets.

@diegorodrigo90
Last active April 16, 2024 21:30
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegorodrigo90/2be8213f3dab0583446f6cf52d397d30 to your computer and use it in GitHub Desktop.
Save diegorodrigo90/2be8213f3dab0583446f6cf52d397d30 to your computer and use it in GitHub Desktop.
Installing garmin express in linux with wine

First we start by creating a wineprefix and installing our prerequisites from terminal:

WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks dotnet452 vcrun2010 corefonts
WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks win7

Note: You will be prompted during the setup for .NET installation just hit next and finish. Also, I like to seperate win7 after the prerequisites are setup to make sure the wineprefix runs in Windows 7 mode.

With that out of the way we need to download and install our GarminExpress.exe Setup executable. I downloaded mine from https://www.garmin.com/en-US/software/express

Run the GarminExpress.exe file in our wine prefix

WINEPREFIX=/home/$USER/GarminExpress wine explorer /desktop=garmin,1366x768 /home/$USER/Downloads/GarminExpress.exe

Note: If you downloaded the GarminExpress.exe to another location replace it above

Modify your shortcut to be the following command

WINEPREFIX=/home/$USER/GarminExpress wine explorer /desktop=garmin,1366x768 ‘/home/$USER/GarminExpress/drive_c/Program Files/Garmin/Express/express.exe’

Upon Launch you should see this screen which should recognize your Garmin device

@serv-inc
Copy link

serv-inc commented Oct 1, 2021

If this fails with a wrong checksum, see rockerbacon/modorganizer2-linux-installer#61 (comment) .

@diegorodrigo90
Copy link
Author

@serv-inc thanks for the help.

@MJWootton
Copy link

Hello & thank you so much for your guide. I installed the prerequisites without issue but when it came to install GarminExpress itself, I received an error message reading "Garmin Express could not be installed on this computer. Try installing again." I tried the solution suggested by serv-inc, but the problem persisted. Do you have any suggestions? The terminal produced the following output:

$ WINEPREFIX=/home/$USER/GarminExpress wine explorer /desktop=garmin,1366x768 /home/$USER/Downloads/GarminExpress.exe
0041:err:ole:ClientIdentity_QueryMultipleInterfaces IRemUnknown_RemQueryInterface failed with error 0x80004002
0042:err:ole:marshal_object Failed to create an IRpcStubBuffer from IPSFactory for {b196b283-bab4-101a-b69c-00aa00341d07} with error 0x80004002
0041:err:ole:ClientIdentity_QueryMultipleInterfaces IRemUnknown_RemQueryInterface failed with error 0x80004002
0042:err:ole:marshal_object couldn't get IPSFactory buffer for interface {af86e2e0-b12d-4c6a-9c5a-d7aa65101e90}
0041:err:ole:ClientIdentity_QueryMultipleInterfaces IRemUnknown_RemQueryInterface failed with error 0x80004002
0042:err:ole:marshal_object couldn't get IPSFactory buffer for interface {ecc8691b-c1db-4dc0-855e-65f6c551af49}
0041:err:ole:ClientIdentity_QueryMultipleInterfaces IRemUnknown_RemQueryInterface failed with error 0x80004002
0042:err:ole:marshal_object couldn't get IPSFactory buffer for interface {94ea2b94-e9cc-49e0-c0ff-ee64ca8f5b90}
0041:err:ole:ClientIdentity_QueryMultipleInterfaces IRemUnknown_RemQueryInterface failed with error 0x80004002
0042:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000144-0000-0000-c000-000000000046}
0041:err:ole:ClientIdentity_QueryMultipleInterfaces IRemUnknown_RemQueryInterface failed with error 0x80004002
003b:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Foundation.Diagnostics.AsyncCausalityTracer"

Many thanks for any assistance.

@MJWootton
Copy link

MJWootton commented Mar 14, 2022

Hello again.

I found a solution. The following alteration to the commands resolved the issue:

WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks dotnet472 vcrun2010 corefonts d3dcompiler_47
WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks win7
WINEPREFIX=/home/$USER/GarminExpress wine explorer /desktop=garmin,1366x768 /home/$USER/Downloads/GarminExpress.exe

Credit to user "raakile" who commented on this video from Chris Titus Tech.

@Rafael000000
Copy link

Hello all,

I have successfully installed Garmin Express with wine but I don't get it to find my forerunner 245. When I plug my watch in it also only says if I want to use the mass storage option.

Do you know how I can get it to recognize my watch?

My OS: archlabs os
lsusb output:
Bus 003 Device 014: ID 091e:0003 Garmin International GPS (various models)

@MJWootton
Copy link

From what I recall of other people's comments, the watches are more problematic when compared to SatNavs, for what reason I do not know.

@danShumway
Copy link

danShumway commented Oct 10, 2022

Specific comment referenced above: https://www.youtube.com/watch?v=hg01Z6VCox0&lc=UgxEbqkGmPdwv0OUYpd4AaABAg

On Manjaro I had similar results, needed to update .NET (and maybe the other stuff like d3dcompiler_47 was necessary, I'm not sure).

The followup problem is that maps fail to update (at least for the nuvi 25 series), throwing the errors in Wine:

02fc:fixme:secur32:get_cipher_algid unknown algorithm 23
02fc:fixme:secur32:get_mac_algid unknown algorithm 200, cipher 23

That leads me to https://forum.winehq.org/viewtopic.php?t=35667, I suspect that when Garmin tries to download the maps it can't properly encrypt/decrypt them or something. Maybe there's a manual install process that I just haven't found.

Device firmware updates do appear to work, I vaguely wonder if they're using a different encryption strategy? Or maybe there's a completely separate problem that I'm not aware of. I'll try to boot up a Windows VM and test to see if I see similar errors there. Express unsurprisingly doesn't show any user-accessible errors, it just says the maps failed to install.

Edit: I am able to download the maps locally to my device for Garmin's planning software or whatever it is. Could mean it's a problem with the device, could be irrelevant. I don't have the software installed to check to see if they import. Express isn't installing in any of my VMs, so 🤷, it's tough to debug that.

@danShumway
Copy link

danShumway commented Oct 11, 2022

Was able to finally get a Windows 8 VM up and running for comparison, and maps do update, so it does appear to be a Wine issue (or maybe a Linux USB issue judging from some stuff I've read online?) -- not a device issue. That being said, Garmin Express also appears to be just kind of wildly temperamental in general -- it refused to install until I updated Windows, then refused to boot after I installed it until I uninstalled it, cleared out its cache files, and then reinstalled it... so maybe it just doesn't like my computer/distro.

The upshot is that if you're finding this thread, MJWootton's comment works to install as of October 2022, and you should be able to at least download new firmware, but you may not be able to update maps. Maybe you'll have more luck though because this software appears to just randomly break sometimes.

Given that Garmin GPSes just mount as USB drives, it's really ridiculous that you need software to update their maps in the first place and that there isn't a manual process for doing so. But companies are going to do their thing I guess.

@rodkings
Copy link

Hello again.

I found a solution. The following alteration to the commands resolved the issue:

WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks dotnet472 vcrun2010 corefonts d3dcompiler_47
WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks win7
WINEPREFIX=/home/$USER/GarminExpress wine explorer /desktop=garmin,1366x768 /home/$USER/Downloads/GarminExpress.exe

Credit to user "raakile" who commented on this video from Chris Titus Tech.

Just want to add that I successfully installed and ran Garmin Express on Nobara Linux (Fedora) following these 3 commands.
I was also able to connect to my watch (after mounting it first).
Thanks!

@miromarszal
Copy link

miromarszal commented Dec 7, 2022

For me the device is detected only when I mount the drive. I'm using Bottles. The /dev/sda that is added by default didn't work; I had to add a drive pointing to the /run/user/(...)/GARMIN directory explicitly. Also, I didn't need to run it in the virtual desktop.

There are other issues: pretty much any pop-up window is black and maps don't seem to sync or update.

EDIT: Disabled d3d compatibility improvements in Bottles and black windows are gone! Also maps seem to sync. I just couldn't see that with those black windows :)

@cbeley
Copy link

cbeley commented Apr 13, 2023

Just tried this all out, and it all works with @MJWootton 's notes. However, I also wanted to make the install 100% headless/unattended and noticed some other things. I was able to update my Inreach Mini without issue on Ubuntu. My notes and links to my scripts:

  • wine explorer /desktop=garmin,1366x768 does not seem necessary to run it once installed.
  • You can use --unattended to not have to go through all the prompts with winetricks: winetricks --unattended dotnet472 vcrun2010 corefonts d3dcompiler_47
  • From the help menu from the GarmExpress.exe installer, it points out a /passive option. With this, you do not have to click a single button to install it and it auto-exits upon completion: wine explorer /desktop=garmin,1366x768 ./GarminExpress.exe /passive
  • The .desktop file wine will create for you automatically is not very useful. You can delete if you'd like: rm -rf "$HOME/.local/share/applications/wine/Programs/Garmin"

The unattended install scripts I wrote are here (though, they are meant to be executed within the context of my environment repo, but may be useful to some):

I appreciate the notes from others! Wanted to pay it forward.

@hannesweisbach
Copy link

The installation works fine for me. However, after I launch Garmin Express and want to add my device Garmin Express crashes when clicking "Sign In" ("Create Account" also crashes) in libcef. Does anyone have the same issue?

@jdancouga
Copy link

The installation works for me as well. However, it does not detect the plugged in Garmin device at all. I am not sure what I am missing.

@hannesweisbach
Copy link

@jdancouga What device are you using? Afaik, wine handles only serial and USB mass storage devices. Does it help when you plug the device in before you launch wine/Garmin Express?
You can check if there are proper symlinks in $WINEPREFIX/devices/ before launch. For a serial device it's probably also work checking if you have access permission to the device. For example: Is your user in the dialout group?

@jdancouga
Copy link

@hannesweisbach I am using Garmin vivoactive 4 fitness watch. When connecting the device to my Linux Mint 21.1 PC, it does detect it, and I can access the storage of the device. However, there is a error message that keep coming and going while the device is connected. Some searching on the error message brought me to this github issue: linuxmint/nemo#2663
I wonder if these are related.

I did add myself to the "dialout" group, but still no dice. Can you please tell me what distro are you using? I want to try other distro and see if this is an issue only in Mint.

@hannesweisbach
Copy link

I read somewhere that the watches can be a bit finicky. MTP seems also not be the most reliable. I think there is also a fuse implementation for MTP, which you could try instead of gvfs.
The dialout group would only help for devices connected via serial.

Are you able to log into your Garmin Connect account within Garmin Express, when you connect your watch? Or don't you get that far?

@technics42
Copy link

I am also able to install GarminExpress.
My device is also recognized.
I can download and install newest firmware.
I can also download new maps.

But I cannot install new maps - it cannot activate the maps.

Garmin-log says:
2023-05-09 18:30:09.3492 | 1 | I | msi has exited. Exit time: 9.5.2023 18:30:09, Exit code: 0, Elapsed time: 42131
2023-05-09 18:30:10.3584 | 8 | I | Failed during install to computer: System.Exception: output file doesn't contain a success code
at Garmin.Omt.Express.UI.Updates.Map.UpdateMapViewModel.<>c__DisplayClass40_0.<b__0>d.MoveNext()
2023-05-09 18:30:10.3594 | 1 | W | Failed computer install
System.Exception: output file doesn't contain a success code

Wine says:
04c8:fixme:secur32:get_cipher_algid unknown algorithm 23
04c8:fixme:secur32:get_mac_algid unknown algorithm 200, cipher 23
04c8:fixme:secur32:get_cipher_algid unknown algorithm 23
04c8:fixme:secur32:get_mac_algid unknown algorithm 200, cipher 23
0430:fixme:winsock:addrinfo_flags_to_unix unhandled flags 0x20000
04c0:fixme:secur32:get_cipher_algid unknown algorithm 23
04c0:fixme:secur32:get_mac_algid unknown algorithm 200, cipher 23
04c0:fixme:secur32:get_cipher_algid unknown algorithm 23
04c0:fixme:secur32:get_mac_algid unknown algorithm 200, cipher 23
0430:fixme:winsock:addrinfo_flags_to_unix unhandled flags 0x20000

Someone solved this issue?

@HakunMatat4
Copy link

This no longer works, the system refuses to see mono no matter if you have tried 10 different ways to install mono :(

@p2jh
Copy link

p2jh commented Mar 2, 2024

Hello, I am able to install GarminExpress thanks to the solution pointed out above (the main post didnt work for me but I had an old wine version, not sure what did the trick), but my device (Garmin Venu QS 2 Music) is not detected by the software. It does not change when I plug it in the computer before or after I start wine. The watch is automatically mounted as an MTP device and I can access its storage through the filesystem. I've tried to create symbolic links to the wineprefix directory but it doesn't seem to change a thing.
I am clueless as what I need to do, I'm waiting for jmtpfs (more precisely libmtp) team to update their code as the watch is not recognized by libmtp but in the mean time i'm not sure what to do.

@hannesweisbach
Copy link

hannesweisbach commented Mar 18, 2024

Wine does not handle USB devices at all. That's why it is not working. The only thing you can pass through to wine are serial devices/ports.

I think USB MSC instead of MTP could work by passing through the mount point to wine as new drive letter. That should work, but I'm not 100% sure.

@garydale
Copy link

garydale commented Apr 3, 2024

I'm running Debian/Trixie on an AMD64 system. I got GarminExpress to work using cbeley's scripts (which don't work directly as downloaded - they refer to other scripts and also have his name embedded). Anyway, I got it to launch but wouldn't recognize the device. I added the device as a drive using winecfg but that didn't help.

I can see the device and its files from Linux. Interestingly a lot of the folders have a 1979-12-31-date stamp. I know the device is old but these dates don't seem reasonable. Other dates are from 2007, 2008, 2010, 2014, 2019 and 2022, which seem more like how the device was actually used.

I'm not sure why usb should prove to a problem for wine. It seems to me that wine should just be able to recognize the ports directly.

@hannesweisbach
Copy link

My interpretation of https://wiki.winehq.org/Hardware#USB is: If a device has a Windows kernel space driver, wine can pass through device access from the Windows kernel driver to the USB device via libusb. If the application/driver wants to talk to the USB device using winusb.dll: no dice. Mass Storage is a kernel space driver, but not a third party one you can install, but one built into (or shipped with) Windows itself.

I'm wondering if it is sufficient to give wine access to the already mounted drive: https://wiki.winehq.org/Wine_User%27s_Guide#Drive_Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment