-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support launching VS Code from Bash on Ubuntu on Windows #13138
Comments
We don't support this at the moment. |
In that case, would be good if some message was output to the console window rather than silence. |
@sujaysarma |
@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 |
+1 |
+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. |
@jonomacd You can use the integrated terminal with bash using |
@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). |
@Tyriar How did it work? |
@MathiasMagnus I tried it the other day, I ran |
@Tyriar Oh, my mistake. I assume you're on Windows Insiders then. Because it doesn't work for me on.my work machine. |
@csholmq yeah I think it was. Woo progress 😉 |
I can confirm that it works for me on 14986 too, but I also get an empty file This only happens when running the |
The command runs this which opens cli.js:
It doesn't happen in Git Bash. |
|
This is the arg that is received by VS Code: |
The reason this doesn't work is because the environment ( |
I tried to fix the path conversion issue by using the following:
Unfortunately due to microsoft/WSL#1363 and microsoft/WSL#1494 it just won't work. I also tried to call into In the meantime I can fix the cli.js specifically and get the CLI working for relative files. |
Forked the relative path issue to #18536 as it's going into the release. |
On a related note, there are several mentions of Xming, Vcxsrv and MobaXTerm, but I recently installed X410, a MS Store app (had major discount recently) and I am very satisfied with it. Installs easily (like all Store apps), accelerated OpenGL 3.3, so it suits most of my needs. |
@MathiasMagnus It works for me, but seems to have fewer features than VcXsrv, like “X server without authentication” and “specify display number”. (They may be available in paid version, but there is some issue with my Microsoft Store account…) |
How are the commands |
I guess the VS Code installer just adds a specific entrypoint for WSL into bin files ( |
Seconding the X410 recommendation for GUI. Also, take a look at this for easy setup: |
Add the vs code repo using the MS provided instructions. This issue is about running native VS Code for Linux and you can do that starting with Win 10 build 17134+. Modifying Linux files using Windows VS Code is a separate issue and is resolved utilizing the metadata feature introduced in the same build mentioned above. See the appropriate issue for more discussion on it or the command-line blogs. Technically this issue can be closed since it can in fact be run despite the fact that the I/O infrastructure in WSL still needs improvement to be suitable in some use-cases regarding performance. |
It's still an issue for me Is this going to be fixed in coming Windows builds? |
Pronouns. The OP here was:
There was never a "VSCode" actionable in this issue from the getgo. Any native Linux application (VSCode or otherwise) that doesn't work on WSL is by definition either a bug, or a missing feature, or by-design ( For anyone using VSCode native on WSL, bear in mind graphics scenarios are still nominally unsupported per the WSL FAQ, so you're on your own. But to a first order native VSCode "works" on WSL, and anything that doesn't work isn't really the VSCode team's problem. Bonne chance. |
Ok, I have no idea why I commenting here. I thought what the title meant: Support launching VS Code from Bash on Ubuntu on WindowsWas that when using bash on windows (WSL) and you navigate to a project via the terminal: cd /repos/some-project then from there you can launch VS Code with: code . The expected behaviour is that the terminal launches code and that's it done, what currently happens on my 1809 build machine is that the terminal is locked and you have to So, is there an issue raised for that behaviour @therealkenc? I'll be honest logging an issue isn't the most straightforward affair and I'd rather jump on someone else's issue rather than jump through the hoops needed to report a bug. Thanks 🙏 |
Mine is still running fine, I use it daily for development work. I start up WSL, |
That's the general idea (not directed at you specifically, mind).
No, the expected behavior with that repro is the shell will return with
Pronouns.
There are presently no outstanding issues to jump on. Although new ones are always welcome.
Fair enough I guess, although none of the steps are WSL specific, because there is nothing special about WSL versus a headless Real Linux box with a nonfunctioning
[That's off the cuff. It assumes you have a functioning X Server on localhost. |
I had trouble getting this all working. Running
Then I ran After that I tried again Bob's your uncle. |
Folks may see that on Win10 1803. The error path has been addressed in 1809. Hence the |
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 |
@jaakkouu You do understand you cannot say goodbye to XServer, right? |
Pronoun. If by it you mean WSL Windows interop, that has been available since build 14951 circa October 2016. Launching
Another one. Depends on your purpose. If your purpose it to edit text files in |
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:
using 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
A workaround is to use a VNC server running on the remote Linux host instead of an X Server running on Windows. |
Check these steps, it solved my issue: |
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 |
Also support relative paths Fixes microsoft#13138
Steps to Reproduce:
(NOTE: I am running Xming on my Windows 10 host, and have "export DISPLAY=:0" set in my .bashrc file)
Expected result:
Code launches in a GUI window.
Actual result:
Absolutely nothing happens. There is no output. The prompt just returns in a couple of seconds.
The text was updated successfully, but these errors were encountered: