cbwin icon indicating copy to clipboard operation
cbwin copied to clipboard

No terminal support

Open ghost opened this issue 9 years ago • 6 comments

I know I can use ssh to connect directly to running machine or even use virtualbox GUI to connect to the running virtual machine, but sometimes it is more convenient to be used as such. Currently if I try to wrun vagrant ssh or wrun ssh it gives me:

Pseudo-terminal will not be allocated because stdin is not a terminal.

ghost avatar Sep 20 '16 10:09 ghost

I've also noticed that if I start cmd.exe, it works properly(except for ctrl-c), but if I run wrun vagrant ssh -- -t -t that forces terminal allocation, it seems to be broken like it does not send back some escape sequence

ghost avatar Oct 03 '16 13:10 ghost

I don't know vagrant, but I will attempt to give it a try. From which environment did you tried wrun vagrant ssh or wrun ssh? Directly from console created by outbash.exe (without extra screen/tmux involved) or from anything else?

xilun avatar Oct 08 '16 19:10 xilun

Well usually using tmux, with pure outbash console situation is slightly different, as it correctly detects STDIN as terminal, and ssh session starts. However, it is not usable, as for example, if I type command, it hangs, no output can be seen. Ctrl-C terminates the session(instead of passing it down to ssh)

ghost avatar Oct 09 '16 07:10 ghost

In a tmux you don't have access to the windows console API (stdin/out/err are redirected), so the only way to support it would be something like injecting a DLL into all spawned processes that would convert the windows console API calls to VT stuff (if that's possible at all, I'm not even sure). I'm almost certain that I'm not going to do that, but if anybody want to contribute that kind of craziness I'll look at the patch :)

For the directly in a console scenario, I'll soon add some GetConsoleMode() and SetConsoleMode() calls, that, I think, will improve the situation.

xilun avatar Oct 15 '16 14:10 xilun

I've not tested directly with vagrant but the result with wrun cmd in a console after commit ab86dc8 is quite good... on the last insider build - but not really usable on the Anniversary Update :/

So I'm unsure something usable can be achieved on the Anniversary Update, in which WSL is a beta version anyway.

xilun avatar Oct 15 '16 22:10 xilun

Ok, so I've solved this radically: fell back to ubuntu for development

ghost avatar Oct 16 '16 07:10 ghost