Score:2

WSL: no screen-drawing programs are visible

de flag

Can't name the question in other way.

Windows 10 LTSC 1809 (b. 17763.2452). Added the MS Store (LTSC des not contain it by default). Installed WSL and Ubuntu 20.04.

The system runs, but I cant use any programs using screen output other than stdout. Examples: mc, tmux, nano and even pager/less (thus man is also unavailable). Invoking such command results black windows with blinking cursor in upper left

partial screen after invoking

(unsure if the picture visible, bu it contains only the part of window header and white cursor on black background)

The program itsef working, and I can exit it using hotkeys or by other means does not require seeing the output. After that the screen isn't restored and I can see the remnants of program's output - 1st page of man, status bar of tmux, 1st page of pager's output etc. But that output is just a static text in the window.

I had used WSL on my previous job, and never met such problems. Complete WSL removal and re-installaion gave no results

NotTheDr01ds avatar
vn flag
Haven't run into or heard of anything like this before with WSL. It sounds like the "alternate screen buffer" isn't engaging properly. This is the mode that those apps switch to for displaying their output. When they exit the alternate screen, the previous contents of the primary buffer should be returned. In your case, it doesn't sound like the secondary buffer is getting engaged, so the (bad) output of those programs is getting written over the primary. What does `echo $TERM` show? Am I correct in understanding this is the behavior "immediately after installing?"
Troublemaker-DV avatar
de flag
@NotTheDr01ds xterm-256color Yes, immediately after installing. I managed to launch WSL in virtual-boxed W11 on Ubuntu host (at home), and all went fine.
cocomac avatar
cn flag
What terminal emulator are you using? Can you try a different one? I'd suggest trying [the new Windows Terminal](https://www.microsoft.com/en-US/p/windows-terminal/9n0dx20hk701), if you haven't tried it yet. See if those programs work there.
Troublemaker-DV avatar
de flag
@cocomac alas, my build does no support installing the WT - it require newer builds (18362.0 or higher). So, I use Windows standard console se by default
Troublemaker-DV avatar
de flag
same results are on `tput smcup` invocation (from https://stackoverflow.com/questions/11023929/using-the-alternate-screen-in-a-bash-script ) - the blank screen, but system does not hang: I can type `tput rmcup` to get back
Troublemaker-DV avatar
de flag
found almost good workaround, and it seems that MS broke something, in this interesting thread: https://github.com/microsoft/WSL/issues/7660 I added `export TERM=xterm-color` into `~/.profile` and things seems to be smooth enough. I tried every terminal from ls /lib/terminfo/* - some produced b/w output, some gave is colors, but F1..F4 keys failed to work etc
NotTheDr01ds avatar
vn flag
@Troublemaker-DV Excellent - Can you post that as an answer then? And dang - I think I've seen that Github issue before and even referenced it in an answer, but I couldn't find it this time when looking. Glad you did!
Troublemaker-DV avatar
de flag
@NotTheDr01ds Here it is :-)
Score:1
de flag

In this interesting thread: github.com/microsoft/WSL/issues/7660 I found almost good workaround, and it seems that MS broke something.

I added export TERM=xterm-color into ~/.profile and things seems to be smooth enough. I tried every terminal from ls /lib/terminfo/* - some produced b/w output, some gave is colors, but F1..F4 keys or even arrows failed to work etc

But the screen becomes clear after exiting the program, no previous screen contents preserved, even if it should. I noted that most complaints were related to LTSC b17763 and WinServer 2019 based on this build of Win10.

It will be very appreciated, should any one propose real solution for this problem

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.