5

There is a couple of guides out there on how to get GUI applications running in Linux Subsystem for Windows (WSL).

I tried to follow a handful of them, but each of them had something in common: Both Linux native Github Atom and Linux native Visual Studio Code refused to open.

In my last approach, following this overly simple guide, I don't get any error messages. Running atom or code just doesn't do anything and instantly returns.

To put that into perspective, running gvim works without a problem:

enter image description here

What could be the issue here?

Edit: Some details:

  • I am using Windows 10 Pro build 17134. (I am not able to join Insiders).
  • I am using the default Ubuntu distribution for WSL.
  • I tried using xfce4, but got the following error when trying to start Atom:

assertion 'pthread_mutex_unlock(&m->mutex) == 0' failed at pulsecore/mutex-posix.c:108, function pa_mutex_unlock(). aborting.

This could be resolved when running sudo apt remove --purge libpulse0 but xfce4 depends on it.

Or one could use Windows 10 build 17627 which was never released as far as I can tell.

So in my latest test I am not using any desktop environment, but instead start the applications directly into DISPLAY=:0.0 so Xming could pick it up, which it does for gvim. (I am using LIBGL_ALWAYS_INDIRECT=1 too)

Edit 2:

I tried 18.04, using latest Atom release and both with and without xfce4. Neither was successful.

0

1 Answer 1

3
  • Installation:

    • Atom: Download Atom DEB package from GitHub: Atom releases. Install it with dpkg -i /path/to/atom-amd64.deb command. If there is any dependency error install those packages with apt-get install -f command (source).

    • VS Code: Download Visual Studio Code DEB package from VScode link. Install it with dpkg -i /path/to/code_amd64.deb command. If there is any error with libgtk-x11-2.0 library install it with apt install libgtk2.0-0 command (source).

  • Configure X server: Download VcXsrv and install it. Execute xlaunch.exe with default settings (Display Number -1or 0). Add the following environment variables to your .bashrc:

    • export DISPLAY=:0 (echo 'export DISPLAY=:0' >> ~/.bashrc).
    • export LIBGL_ALWAYS_INDIRECT=1 (echo 'export LIBGL_ALWAYS_INDIRECT=1' >> ~/.bashrc)
  • Execute Atom/VSCode: Type atom to execute Atom text editor or code to execute VS Code.

  • Notes: Install only 64bit binaries because WSL is now only available in 64bit Windows OS. Don't run with root user. Always run apt update and apt upgrade before and after installation. These installations are not dependent on the desktop environments, so that is optional. Long live open-source.

1
  • 1
    Except for using Xming instead of VcXserv that is exactly what I did in the first place. Commented Aug 9, 2018 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .