You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support launching VS Code from Bash on Ubuntu on Windows #13138
changed the title [-]In WSL, does not launch, no error message[/-][+]VS Code does not launch or give error when running via Bash on Ubuntu on Windows[/+]on Oct 3, 2016
Have you tried --verbose? This is what I see (see attachment)... Tell me how this is supposed to let someone know that it is "not supported"? What would be meaningful is a message like "Code is not supported to run on your OS/platform/configuration".
Reacted by Oleg Shalygin, Joe Pea, nimbosa, Stefanos Anastasiou, Jacob M-G Evans, Leo Borai and Ardeshir Izadi
Reacted by Ivan Tytarenko, Manav Misra, Joel Rainear Wills, Diaa J, James Maguire, Tyler Mace, Kacper Olek, falfia falfiya, Jeffrey and Shardul Mahadik
Sujay Sarma (@sujaysarma) vscode has a relatively small team compared to the size of the product, we simply do not have the people to cover every single edge case. I looked briefly at support for Bash on Ubuntu in the past and came to the conclusion that it is not worth the effort right now while it's so new.
The output from --verbose gives you some information about why it is not starting as I said, you can look into it here if you're interested.
Reacted by Alex, arrcher, Ivan Tytarenko, therealkenc, Manav Misra, imyhxy, Leon Adler, Joel Rainear Wills, Zachary Lysobey, Matthew and 8 more
Reacted by Kirk Rohani, moon13, Guan-De Wu, Jacob M-G Evans, Oscar Gallo, Ivan Wang, Maximilian Berkmann, relative2, Danny Turrin, Eric Swanson and 2 more
changed the title [-]VS Code does not launch or give error when running via Bash on Ubuntu on Windows[/-][+]Support launching VS Code from Bash on Ubuntu on Windows[/+]on Oct 5, 2016
Support for this such that vscode uses the bash terminal for everything would be great. I don't want to see, touch or smell the windows terminal. Every shell out directed to bash for windows please.
Reacted by Tom Maiaroto, Ivan Malagon, Damian Rajca, Isaac Daly, Christian Pekeler, Señor Gus, dirtshell, Shiv Rossi, jie.f, 10XL and 58 more
Reacted by Noob Tsai, Erik Cupal, Hsiao-Chieh Tsai, Alex McMillan, Skyler Mäntysaari, Shawn Cicoria, Matthew, PendletonJones, Ni Kaixiang, Eddy Ekofo and 2 more
Reacted by Callum Gare, Shawn Cicoria, gparmigiani, Matthew, Eddy Ekofo, Claude Léveillé and mjacksonlgh
Jono MacDougall (@jonomacd) You can use the integrated terminal with bash using "terminal.integrated.shell.windows": "C:/Windows/sysnative/bash.exe"
Reacted by Christopher Peisert, Max Waterman, Andrew Hyndman, Cuahutli Miguel Ulloa Robles, Rafael Noronha, Kunal Piush Kumar, Lyuben Todorov, Leon Adler, nimbosa, Dan Caron and 6 more
Reacted by XTY and Richard Lalancette @ Warner Media
Reacted by Carrie Kendall, Maximilian Berkmann, Stéphane Erbrech, NarniaT, Ardeshir Izadi and Sandor
Sebastian Holmqvist (@csholmq) this one's about launching vscode from a bash in Windows shell, which actually works last time I checked, it just needs some refinement (an empty cli.js file was opening).
Running code -verbose gave me error:
Assertion 'pthread_mutex_unlock(&m->mutex) == 0'
Folks may see that on Win10 1803. The error path has been addressed in 1809. Hence the # .... running on Win10 1809. Purging libpulse0 is a reasonable work-around.
Starts fine for me - just typing "code" in the bash shell on ubuntu (WSL): Probably supported in a later version than #13138, e.g. mine is
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17134 N/A Build 17134
Pronoun. If by it you mean WSL Windows interop, that has been available since build 14951 circa October 2016. Launching code.exe via interop was not the question asked in the OP.
I will not be using it for this purpose
Another one. Depends on your purpose. If your purpose it to edit text files in /mnt/c, à la notepad.exe, yes. If your purpose is software development it depends a lot on the scenario, until the work in #63155 is complete.
While I got vscode installed in WSL and running graphically with vcxsrv it's kind of a hassle to have to launch vcxsrv everytime I want to use vscode to open a file from WSL bash cli. I found a solution which was to create the following alias:
alias vscode="/mnt/c/'Program Files'/'Microsoft VS Code'/Code.exe"
using vscode as an alternative command word keeps it from interfering with the normal code command word in the cli but also makes it easy for me to open the windows version of vscode from my bash prompt. Woo!
This is probably pretty obvious to other devs, but like I said, I'm pretty new to development so I'm glad I figured it out! :)
I have the same issue as #35553 (marked as a duplicate of this one), which is that VS Code won't run under Linux when using a remote X server. This results in a silent failure under normal conditions or the following error under --verbose:
[main 2019-03-20T18:17:33.461Z] windowsManager#open
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
code: xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
A workaround is to use a VNC server running on the remote Linux host instead of an X Server running on Windows.
Reacted by therealkenc, ik0r, Vladimir Setka, Shawn Thuris, Peixuan Li, Corentin, James Smith, Alexander P., Sebastian Kusnier and Agustín Cisneros
Reacted by Drew McMurry, Tara Raj, Yukai Huang, Vladimir Setka, Bernard Vander Beken, Felipe Ojeda, Peixuan Li, Alexander P., Sebastian Kusnier, Agustín Cisneros and 1 more
Reacted by Sean Fausett, Aslan French, Ryan Sullivan, Yukai Huang, Vladimir Setka, Bernard Vander Beken, Luca Poldelmengo, Satvik Pendem, Peixuan Li, Christoph Pirkl and 3 more
Activity
[-]In WSL, does not launch, no error message[/-][+]VS Code does not launch or give error when running via Bash on Ubuntu on Windows[/+]Tyriar commentedon Oct 3, 2016
We don't support this at the moment.
sujaysarma commentedon Oct 4, 2016
In that case, would be good if some message was output to the console window rather than silence.
Tyriar commentedon Oct 4, 2016
Sujay Sarma (@sujaysarma)
code --verboseshould give you some infosujaysarma commentedon Oct 5, 2016
Have you tried --verbose? This is what I see (see attachment)... Tell me how this is supposed to let someone know that it is "not supported"? What would be meaningful is a message like "Code is not supported to run on your OS/platform/configuration".

Tyriar commentedon Oct 5, 2016
Sujay Sarma (@sujaysarma) vscode has a relatively small team compared to the size of the product, we simply do not have the people to cover every single edge case. I looked briefly at support for Bash on Ubuntu in the past and came to the conclusion that it is not worth the effort right now while it's so new.
The output from
--verbosegives you some information about why it is not starting as I said, you can look into it here if you're interested.[-]VS Code does not launch or give error when running via Bash on Ubuntu on Windows[/-][+]Support launching VS Code from Bash on Ubuntu on Windows[/+]MathiasMagnus commentedon Oct 23, 2016
+1
jonomacd commentedon Jan 6, 2017
+1E99
Support for this such that vscode uses the bash terminal for everything would be great. I don't want to see, touch or smell the windows terminal. Every shell out directed to bash for windows please.
csholmq commentedon Jan 10, 2017
Jono MacDougall (@jonomacd) You can use the integrated terminal with bash using
"terminal.integrated.shell.windows": "C:/Windows/sysnative/bash.exe"Tyriar commentedon Jan 10, 2017
Sebastian Holmqvist (@csholmq) this one's about launching vscode from a bash in Windows shell, which actually works last time I checked, it just needs some refinement (an empty cli.js file was opening).
MathiasMagnus commentedon Jan 10, 2017
Daniel Imms (@Tyriar) How did it work?
168 remaining items
jaakkouu commentedon Nov 3, 2018
I had trouble getting this all working. Running
code -verbosegave me error:Assertion 'pthread_mutex_unlock(&m->mutex) == 0' failed at pulsecore/mutex-posix.c:108, function pa_mutex_unlock(). Aborted.Then I ran
sudo apt purge libpulse0to remove the failing package.After that I tried again
Code .Bob's your uncle.
therealkenc commentedon Nov 3, 2018
Folks may see that on Win10 1803. The error path has been addressed in 1809. Hence the
# .... running on Win10 1809. Purginglibpulse0is a reasonable work-around.Jaff1 commentedon Dec 10, 2018
Starts fine for me - just typing "code" in the bash shell on ubuntu (WSL): Probably supported in a later version than #13138, e.g. mine is
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17134 N/A Build 17134
MathiasMagnus commentedon Dec 11, 2018
Jaakko Uusitalo (@jaakkouu) You do understand you cannot say goodbye to XServer, right?
therealkenc commentedon Dec 11, 2018
Pronoun. If by it you mean WSL Windows interop, that has been available since build 14951 circa October 2016. Launching
code.exevia interop was not the question asked in the OP.Another one. Depends on your purpose. If your purpose it to edit text files in
/mnt/c, à lanotepad.exe, yes. If your purpose is software development it depends a lot on the scenario, until the work in #63155 is complete.jcklpe commentedon Jan 7, 2019
Just a follow up note on my earlier comment.
While I got vscode installed in WSL and running graphically with vcxsrv it's kind of a hassle to have to launch vcxsrv everytime I want to use vscode to open a file from WSL bash cli. I found a solution which was to create the following alias:
alias vscode="/mnt/c/'Program Files'/'Microsoft VS Code'/Code.exe"using
vscodeas an alternative command word keeps it from interfering with the normal code command word in the cli but also makes it easy for me to open the windows version of vscode from my bash prompt. Woo!This is probably pretty obvious to other devs, but like I said, I'm pretty new to development so I'm glad I figured it out! :)
JoeRoddy commentedon Jan 11, 2019
sudo apt-get install realpaththen restart terminal got it working for me.
sbonds commentedon Mar 20, 2019
I have the same issue as #35553 (marked as a duplicate of this one), which is that VS Code won't run under Linux when using a remote X server. This results in a silent failure under normal conditions or the following error under
--verbose:A workaround is to use a VNC server running on the remote Linux host instead of an X Server running on Windows.
championbarca commentedon Apr 23, 2019
Check these steps, it solved my issue:
https://discuss.atom.io/t/atom-over-x11-forwarding-with-xming-errors/25151/7
RMacfarlane commentedon May 2, 2019
We just announced remote development with VS Code, check out the blog post for details https://code.visualstudio.com/blogs/2019/05/02/remote-development
Fix cli.js always opening from WSL shell