Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Issue with Teensy loader when using WSL (Windows Subsystem for Linux)

  1. #1
    Junior Member
    Join Date
    Oct 2020
    Posts
    3

    Issue with Teensy loader when using WSL (Windows Subsystem for Linux)

    I've tried installing the Teensy loader in WSL so that I can program in a Linux environment.
    I followed the instructions for installing on Ubuntu. The error I'm getting is a missing library (see console output below).

    I'm not sure whether this error is related to WSL, but I don't have a separate Linux PC to test that on at the moment.

    Code:
    jakob@DESKTOP:~/Downloads$ ls /etc/udev/rules.d/
    49-teensy.rules
    jakob@DESKTOP:~/Downloads$ ls
    libpng12.so.0  libusb-0.1.so.4  teensy  teensy_linux64.tar.gz
    jakob@DESKTOP:~/Downloads$ ./teensy &
    [1] 2162
    jakob@DESKTOP:~/Downloads$ ./teensy: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
    ^C
    [1]+  Exit 127                ./teensy
    jakob@DESKTOP:~/Downloads$

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,039
    Officially, PJRC only tests and supports this Linux-based software on Ubuntu, and only Ubuntu running on real hardware (not virtual machines). Most other Linux systems tend to work, but we don't test with any others and we (usually) don't alter the software to suit any other Linux distros or systems. When it doesn't work on a non-Ubuntu system, your only path is to try to install the stuff that system is missing. Or you can just use Ubuntu.

    However, libgtk2.0 is among the most commonly used libraries for GUI-based software on Linux. If you're missing this library, very likely you have a console-only system which isn't capable of running graphical software. If you can't install the graphical system stuff, this command line program might be what you need. Maybe?

    https://github.com/PaulStoffregen/teensy_loader_cli

    If you want to run the GUI version, you're going to need to set up X11 and GTK and all the other usual graphical environment which Ubuntu and most other Linux systems provide. Lots of info can be found online. Here's a couple that turned up by a quick Google search.

    https://askubuntu.com/questions/8978...-display-error

    https://stackoverflow.com/questions/...-wsl-with-gtk2

    But again, I want to emphasize that PJRC's position on Linux is only Ubuntu is officially supported. Most others tend to work, but when they don't, you're mostly on your own to figure out how to install or fix the stuff they're missing.

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,912
    I could be wrong, but I don't think this will work. The Ubuntu window is a command line orientated setup, and I don't believe it has any graphical setup built in.

    Not sure how well it would work, but I believe there are a few websites showing ways to add a linux desktop to it... Not sure if it would work or not.
    https://www.makeuseof.com/tag/linux-...ows-subsystem/

    Again don't know if it would work or not...

  4. #4
    Junior Member
    Join Date
    Oct 2020
    Posts
    3
    Thanks for the quick reply.
    WSL is a console only system, so that explains it.

    I'll give the CLI version a try.

    Cheers

  5. #5
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    583
    My team uses WSL for loading software to Teensy. Did you know that you can call Windows executables from the WSL environment? The easiest path that we've found is calling the windows version of the teensy_loader_cli from WSL as part of our build process.

  6. #6
    Junior Member
    Join Date
    Oct 2020
    Posts
    3
    Cool. Thanks for the tip

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •