Repository navigation
Description
Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!
- A brief description
I was able to install the VS Code deb version. I got Xserve running in Windows 10, but unfortunately is giving an error when executing "code":
/usr/share/code/bin/../code: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory - Expected results
To be able to open VS Code in Windows Bash in Xwindows. - Actual results (with terminal output if applicable)
maxt@MTrinidadLT2:/mnt/c/Users/mtrinidad/Downloads$ sudo dpkg -i code_1.6.1-1476373175_amd64.deb
[sudo] password for maxt:
(Reading database ... 46508 files and directories currently installed.)
Preparing to unpack code_1.6.1-1476373175_amd64.deb ...
Unpacking code (1.6.1-1476373175) over (1.6.1-1476373175) ...
Setting up code (1.6.1-1476373175) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
maxt@MTrinidadLT2:/mnt/c/Users/mtrinidad/Downloads$ code
/usr/share/code/bin/../code: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
maxt@MTrinidadLT2:/mnt/c/Users/mtrinidad/Downloads$
- Your Windows build number
Windows 10 Pro Insider Preview - Build 14946 - Steps / All commands required to reproduce the error from a brand new installation
VS Code installation went without any errors:
maxt@MTrinidadLT2:/mnt/c/Users/mtrinidad/Downloads$ sudo dpkg -i code_1.6.1-1476373175_amd64.deb
[sudo] password for maxt:
(Reading database ... 46508 files and directories currently installed.)
Preparing to unpack code_1.6.1-1476373175_amd64.deb ...
Unpacking code (1.6.1-1476373175) over (1.6.1-1476373175) ...
Setting up code (1.6.1-1476373175) ...
Processing triggers for mime-support (3.54ubuntu1.1) ... - Strace of the failing command
N/A - Required packages and commands to install
N/A
See our contributing instructions for assistance.

Activity
fpqc commentedon Oct 20, 2016
I haven't tried vcXsrv for vscode, but you will need at least that, and to export DISPLAY=:0
qazwsxedcrfvtg14 commentedon Oct 20, 2016
In Build 14951
You can try to add
alias code=""/mnt/c/Program Files (x86)/Microsoft VS Code/Code.exe""
in ~/.bashrc
(You need to install VS Code in windows first.)
Then you can type "code FILENAME" to open file.
(but this only work fine in windows directory(/mnt/c/, /mnt/d/) )
MaximoTrinidad commentedon Oct 20, 2016
I'm way ahead! I've been using vcXsrv for a while.
As I mention before, vs code is loaded. I'm just still getting the same error message when its trying to load:
"/usr/share/code/code: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory"
And, I don't want to run it from Windows Program files as is already loaded under the Linux subsystem.
See images Windows 10, BASH, and vcXsrv as I created some Linux batch to run some Linux apps.
It's so close for VS Code work!
MaximoTrinidad commentedon Oct 20, 2016
Hum! As I posted the previous code, I realized the code for VS Code, I found the "standard install location". It has to be something in BASH because this VS Code work in Linux perfect.
therealkenc commentedon Oct 21, 2016
"It's so close for VSCode to work". Electron apps are based on a large body of software not currently supported by WSL. See #648.
Weird you don't have libXss though, given that you've made it this far. That's the Screen Saver extension library, which should have come along for the ride with your other X11 stuff. You can install it with
sudo apt-get install libxss1, but that isn't going to help your cause much. Sublime Text works well, for what it's worth.MaximoTrinidad commentedon Oct 21, 2016
Awesome!
Now the error message changes to:
maxt@MTrinidadLT2:/mnt/c/Windows/System32$ code
/usr/share/code/bin/../code: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
:)
fpqc commentedon Oct 21, 2016
Sounds like the next thing you need is gtk?
therealkenc commentedon Oct 21, 2016
Do
sudo apt-get install ubuntu-desktopso at least you have the bits and pieces needed to run graphic apps, including firefox. All of which is unsupported by WSL at the moment, but like the man said if it works you can go and have fun. ;)MaximoTrinidad commentedon Oct 21, 2016
therealkenc
Found it missing library: http://stackoverflow.com/questions/37624225/shared-libraries-libgconf-2-so-4-is-missing
So I ran:
sudo apt-get install Gconf2
Now, when executing "code". No errors but is not showing on the screen.
But, I'm use the cmd "top" to list all services running and it showing three "code" running.
I'm almost there!
Any ideas are Welcome!!
therealkenc commentedon Oct 21, 2016
From here mostly my idea would be to recompile libchromiumcontent and figure out why glibc's pthread implementation is setting
FUTEX_CMP_REQUEUE_PRIVATEonfutex()even though no special flags seem to be set anywhere in the source. That's where I got last time I looked, anyway.MaximoTrinidad commentedon Oct 21, 2016
After installing xubuntu-desktop, and running the "code" from "nautilus" I can see a message pop out:
Home directory not accessible: Permission denied
Assertion 'pthread_mutex_unlock(&m->mutex) == 0' failed at pulsecore/mutex-posix.c:108, function pa_mutex_unlock(). Aborting.
libGL error: failed to load driver: swrast
[75:1021/104943:FATAL:thread_helpers.cc(44)] Check failed: 3UL <= task_stat.st_nlink (3 vs. 1)
#0 0x000001e0962e
#1 0x000001e1f23b
#2 0x000001261765
#3 0x00000258737f
#4 0x000002586d16
#5 0x0000012711f8
#6 0x000001270672
#7 0x000001203e97
#8 0x000001202970
#9 0x0000033a9313 main
#10 0x7fa3b30e1f45 __libc_start_main
#11 0x000000574d79
therealkenc commentedon Oct 21, 2016
Yes that's (3) in the list here. You might want to take the rest of this over to that thread.
MaximoTrinidad commentedon Oct 21, 2016
Ah! I'm guessing I'm running into a dead-end route. I'm finally getting a grip on Linux but I reach my limit now. Only I could make the code to come up. :P
I'm will follow the other thread then.
Thanks therealkenc!
benhillis commentedon Oct 21, 2016
Maximo Trinidad (@MaximoTrinidad) Shameless plug for running the Windows version of VSCode with our new interop feature :)
MaximoTrinidad commentedon Oct 21, 2016
Just to be clear! I know I can run Windows VS Code and point to the Linux subsystem folder where my scripts are stored. I just wanted to be able to install the debian version of Code and run it separate from the Windows version. Just for demo purpose!
I think it would be nice if is possible.
:)
:)
10 remaining items
MaximoTrinidad commentedon Mar 13, 2017
Ah! It still doesn't work.
:(
So, the only work around is to create your script files (Python, PowerShell...) using your Windows Editors apps and then run the code on either your WSL Bash console or, if you have it installed, on your Ubuntu Desktop.
I know it will be just a matter of time when this issue get fixed.
:)
felocru commentedon Apr 27, 2017
Something new? I have the same problem
MaximoTrinidad commentedon Apr 27, 2017
I think... the reality is that WSL wasn't meant to work with the GUI Ubuntu Desktop although it possible. But trying to load the debian version of VS Code won't work (yet).
So, my option is to build my cross-platform code using the Windows Editors then later I can execute then under WSL Bash subsystem. The only GUI editor I can run in my WSL Ubuntu Desktop is Gedit and I can run terminal and PowerShell with no issues (yet). At least for testing demo purpose, it doable now!
Again, installing Ubuntu Desktop is not certified to run under WSL but for me is pretty functional.
:)
therealkenc commentedon Nov 15, 2017
A VSCode team member chimed in #2293 so it is probably going to be most practical to track further developments regarding VSCode native there since he's subscribed. The OP here was a missing
libxss1followed by a dupe of #1267.nityansuman commentedon May 19, 2018
I'm trying to install vs code under WSL , but even after installation is successful the editor is not running at all. Now when I execute code in the command line, it appears to just do nothing.
MaximoTrinidad commentedon May 19, 2018
Kumar Nityan Suman (@nityansuman)
But, the only way to run VS Code under WSL is to install Windows X Server in Windows 10, and in WSL install the Ubuntu Desktop.
So, Yes! Installing the Ubuntu Desktop you can use VS Code in WSL.
Unfortunately, the Ubuntu Desktop is not supported in Windows 10. But, I've been using it for the last few years!
:)
therealkenc commentedon May 19, 2018
code --verbosewill "do something". Likely pointing out that you don't have$DISPLAYset.MaximoTrinidad commentedon May 19, 2018
therealkenc
Yes! If you installed VS Code in WSL console, then it won't open in Windows 10. It need to the Ubuntu Desktop GUI to open VS Code Linux version.
therealkenc commentedon May 19, 2018
No, you don't. Which is why no one should read #637.
MaximoTrinidad commentedon May 19, 2018
therealkenc
It will be nice to know if you got a workaround. But, this got me thinking. I've been using this for about two years now.
I got a VM with the latest Windows 10 Insider Version 10.0.17672.1000 and only WSL Ubuntu install (no GUI). I installed the latest VS Code stable edition... And ... Yes!!
It's working without installing VSCode in WSL. You can run "Code" from the WSL console and it will open the Windows VS Code version.
There's nothing wrong experimenting with installing GUI in WSL.
So, if you have installed the Ubuntu GUI in WSL then you lose the ability to call the VS Code Windows app.
And, if you still want to install the VS Code Linux version in WSL, then you need to install Ubuntu Desktop to run it.
Interesting findings! Just pick the right environment for your work.
:)
Below image showing calling VS Code Windows App from the WSL console (no Ubuntu Desktop installed).

therealkenc commentedon May 20, 2018
Correct. There is, rather, something not right with installing the Ubuntu Desktop; which is neither necessary nor desirable to run native Linux VS Code on WSL.
MaximoTrinidad commentedon May 20, 2018
therealkenc
Awesome!! Thanks for sharing. I love learning stuff.
Thank You!!
:)