Invoking "screen" from Ubuntu bash shell causes scrollbar (and buffer?) to disappear. #18100

Closed
opened 2026-01-31 06:03:38 +00:00 by claunia · 4 comments
Owner

Originally created by @ossumpossum on GitHub (Aug 4, 2022).

Windows Terminal version

1.14.1962.0

Windows build number

10.0.19044.1826

Other Software

Screen version 4.08.00 (GNU) 05-Feb-20

Steps to reproduce

Start a new Ubuntu bash shell in Windows Terminal.

run "ls -la" several times until the content scrolls off the screen. Note the presence of the scrollbar on the right, and the ability to use the mouse wheel or the scrollbar to scroll back through the content.

Start "screen" via "screen -D -RR".

In the screen session, perform the same "ls -la" steps above. Note the absence of the scrollbar on the right, and the inability to use the mouse wheel or the scrollbar to scroll back through the content.

Expected Behavior

One should be able to scroll back through content independent of the program being run or the TERM environment variable setting (normal bash: xterm-256color; screen: screen.xterm-256color).

Actual Behavior

One loses the ability to scroll back through content once inside "screen".

Originally created by @ossumpossum on GitHub (Aug 4, 2022). ### Windows Terminal version 1.14.1962.0 ### Windows build number 10.0.19044.1826 ### Other Software Screen version 4.08.00 (GNU) 05-Feb-20 ### Steps to reproduce Start a new Ubuntu bash shell in Windows Terminal. run "ls -la" several times until the content scrolls off the screen. Note the presence of the scrollbar on the right, and the ability to use the mouse wheel or the scrollbar to scroll back through the content. Start "screen" via "screen -D -RR". In the screen session, perform the same "ls -la" steps above. Note the absence of the scrollbar on the right, and the inability to use the mouse wheel or the scrollbar to scroll back through the content. ### Expected Behavior One should be able to scroll back through content independent of the program being run or the TERM environment variable setting (normal bash: xterm-256color; screen: screen.xterm-256color). ### Actual Behavior One loses the ability to scroll back through content once inside "screen".
Author
Owner

@zadjii-msft commented on GitHub (Aug 4, 2022):

Yep, that's just how the alternate screen buffer (\x1b[?1049h) works. You'll see this is pretty consistent in most terminal emulators - for example, gnome-terminal:

gh-13670

Admittedly, Windows Terminal didn't support this correctly at all until very recently.

@zadjii-msft commented on GitHub (Aug 4, 2022): Yep, that's just how the alternate screen buffer (`\x1b[?1049h`) works. You'll see this is pretty consistent in most terminal emulators - for example, `gnome-terminal`: ![gh-13670](https://user-images.githubusercontent.com/18356694/182870300-8d7c5049-cd95-47f3-91ad-84902c0360b7.gif) Admittedly, Windows Terminal didn't support this correctly at all until very recently.
Author
Owner

@hijkzzz commented on GitHub (Aug 9, 2022):

However, both iTerm2 and VSCode support this feature well~

@hijkzzz commented on GitHub (Aug 9, 2022): However, both iTerm2 and VSCode support this feature well~
Author
Owner

@kushwavez commented on GitHub (Oct 17, 2022):

Just a note on this:
This issue was affecting my work as I mostly work with screens. After I don't know what release update it suddenly didn't work, I started using Hyper as an alternative, but because it crashed 3 times now in critical times I decided to try and "fix" this issue with the Windows Terminal.

After I rolled back to v1.13.11432.0 the issue was not there, so something is changed around the new releases.

@kushwavez commented on GitHub (Oct 17, 2022): Just a note on this: This issue was affecting my work as I mostly work with screens. After I don't know what release update it suddenly didn't work, I started using Hyper as an alternative, but because it crashed 3 times now in critical times I decided to try and "fix" this issue with the Windows Terminal. After I rolled back to v1.13.11432.0 the issue was not there, so something is changed around the new releases.
Author
Owner

@urza commented on GitHub (Oct 6, 2023):

https://stackoverflow.com/a/1125947

This has worked for me. I did exactly what the SO answers suggestst and now I can scroll in screen sessions from Windows Trerminal.

@urza commented on GitHub (Oct 6, 2023): https://stackoverflow.com/a/1125947 This has worked for me. I did exactly what the SO answers suggestst and now I can scroll in screen sessions from Windows Trerminal.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18100