nxp-mcuxpresso / vscode-for-mcux

Support for NXP Visual Studio Code for MCUXpresso Extension project.
14 stars 0 forks source link

Problems with MCUXpresso Installer on WSL2 #45

Open Brianmm94 opened 1 month ago

Brianmm94 commented 1 month ago

I'm using Ubuntu 22.04.6 LTS for WSL2, and when I first clicked Open MCUXpresso Installer, I got the pop-up asking if I want to download MCUXpresso Installer and I clicked it. However, nothing happened afterwards. I tried clicking Open MCUXpresso Installer again, but again nothing happened. I then tried running it directly with ~/MCUXpressoInstaller/MCUXpressoInstaller, and I got errors about missing shared libraries. I only managed to get it working after I used sudo apt install libgtk-3-0 libgbm1 to install the packages libgtk-3-0 and libgbm1 for the missing libraries. I'm not an expert on GUI apps, but from my understanding this occurs because WSL doesn't come with a graphical desktop environment?

Edit: I tried installing the extension in Windows 11 as well just for reference, and I noticed that there was a progress bar for installing MCUXpresso Installer that never appeared in WSL2. It also appeared as an installed app under Settings->Apps->Installed apps, but on WSL2 it doesn't appear as an installed apt package, so I had to manually delete the ~/MXUXpressoInstaller folder.

Brianmm94 commented 1 month ago

It might also be worth adding some kind of documentation about scaling the MCUXpressoInstaller's GUI within WSL as well if WSLg is being used, such as the following:

  1. To scale the app, including its border, create a .wslgconfig file under %USERPROFILE% on Windows with the following content, replacing <scaling> with the app scaling you want, such as 200 for 200%.
    [system-distro-env]
    WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=<scaling>
  2. To change the DPI of the GTK-based elements (the part within the border), run the following, replacing <X.Y> with the GTK DPI you want, such as 2.5 for 2.5 dots per inch:

echo 'export GDK_DPI_SCALE=<X.Y>' >> ~/.bashrc source ~/.bashrc