Skip to content
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

Is it possible to open Ubuntu subsystem? #52

Open
Bartiik opened this issue May 24, 2020 · 1 comment
Open

Is it possible to open Ubuntu subsystem? #52

Bartiik opened this issue May 24, 2020 · 1 comment

Comments

@Bartiik
Copy link

Bartiik commented May 24, 2020

Hey, same as in the title, do you know the way to open the Ubuntu subsystem, if it's been installed on my PC? I cannot find the proper process to type in Console.StartProcess and parameters.
Thanks for any help :)

@dwmkerr
Copy link
Owner

dwmkerr commented Jun 9, 2020

I'm afraid I don't think it is possible. The reason I think this is the case is when I look at Ubuntu under the WSL, it looks like this:

image

Now I'm not getting exactly the details I'd need to confirm this, but I believe that what is happening here is that the conhost program is actually running a wsl process, which is itself hosting ubuntu. This means that ubuntu is not simply an app with a stdin and stdout which we can pipe data to and from, it really does need to be hosted in the conhost environment.

However, by inspecting where the ubuntu executable actually is, then running cmd then running the ubuntu executable - I get this:

image

Now unless I am mistaken, what I'm seeing here is actually bash telling me that it doesn't recognise commands like ls\r - which makes sense, because I'm on windows - so when I hit enter, bash sees ls\r\n - linux only needs the \n as a linefeed (Windows uses carriage return then linefeed).

So it looks suspiciously like it might work with a bit of tweaking (I forget, but I think running cmd will create a conhost process, but it's been a while since I looked into the internals) but in it's current state, it's not supported I'm afraid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants