I am on windows 10 and have installed Linux (Ubuntu) directly from the store using the guidelines given here I also have Xming and have set DISPLAY=:0 in my bashrc file. Programs such as Firefox and PyCharm run just fine but VSCode does not run. It's not the same as this issueand the produced error messages seem different. running it with --verbose option I got below:
Me@DESKTOP-1:/mnt/e/ubuntu-stored/repoitories/pawlib$ code .
Me@DESKTOP-1:/mnt/e/ubuntu-stored/repoitories/pawlib$ which code
/usr/bin/code
Me@DESKTOP-1:/mnt/e/ubuntu-stored/repoitories/pawlib$ code --verbose
[3773:0916/193522.695084:ERROR:bus.cc(395)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
shared memfd open() failed: Function not implemented
[main 7:35:23 PM] Starting VS Code
[main 7:35:23 PM] from: /usr/share/code/resources/app
[main 7:35:23 PM] args: { _: [],
help: false,
h: false,
version: false,
v: false,
wait: false,
w: false,
diff: false,
d: false,
add: false,
a: false,
goto: false,
g: false,
'new-window': false,
n: false,
'unity-launch': false,
'reuse-window': false,
r: false,
'open-url': false,
performance: false,
p: false,
'prof-startup': false,
verbose: true,
logExtensionHostCommunication: false,
'disable-extensions': false,
disableExtensions: false,
'list-extensions': false,
'show-versions': false,
nolazy: false,
issue: false,
'skip-getting-started': false,
'skip-release-notes': false,
'sticky-quickopen': false,
'disable-restore-windows': false,
'disable-telemetry': false,
'disable-updates': false,
'disable-crash-reporter': false,
'skip-add-to-recently-opened': false,
status: false,
s: false,
'file-write': false,
'file-chmod': false,
'driver-verbose': false }
[main 7:35:23 PM] Resolving machine identifier...
[main 7:35:23 PM] Resolved machine identifier: d4398814e404b0f7472543859e2fed861c7a29fc750e4c131eab633c4e5a44b8
[main 7:35:23 PM] update#setState idle
[main 7:35:23 PM] windowsManager#open
[3805:0916/193523.829735:ERROR:gl_surface_glx.cc(413)] GLX 1.3 or later is required.
[3805:0916/193523.829875:ERROR:gl_initializer_x11.cc(153)] GLSurfaceGLX::InitializeOneOff failed.
[3805:0916/193523.848836:ERROR:gpu_child_thread.cc(252)] Exiting GPU process due to errors during initialization
[3773:0916/193523.869175:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.
[3773:0916/193524.216326:ERROR:browser_main_parts.cc(139)] X IO error received (X server probably went away)
I installed VScode using below commands:
$ sudo apt install curl
$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
$ sudo apt update
$ sudo apt install code
When I got the launch error, I tried installing the .deb file using "dpkg -i" just to make sure the issue wasn't with the installation.
VS Code does not support launching the Linux client via WSL, you can however launch the Windows client via WSL by calling
<VS Code Install>\bin\code.sh
.Also, while it is possible to launch Linux apps through WSL by installing an X server, it's more of an experimental thing. The focus of WSL is about bringing Linux-based command line tools to Windows.