You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot scroll buffer in Terminal with inbox telnet client #6056
Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Help WantedWe encourage anyone to jump in on these.Issue-BugIt either shouldn't be doing this or needs an investigation.Priority-2A description (P2)Product-ConptyFor console issues specifically related to conpty
Hi, I love the new Windows Terminal. I've manage to add my routers and switches to it but the only issue I have is that I can't scroll. Once I log into my switch using ssh, I can't seem to scroll up to see what's above. Kindly let me know how I can activate scrolling.
PS. scrolling works for regular CMD or PowerShell.
Reacted by Lachlan Arthur, Mateusz Urbanek, Alexey Nikitin, Spidersavitch89, Quoc Khanh Le, Tarek Eldeeb, Daniel García, shaulz1, NN, Martin Jensen and 12 more
Hi Dustin,
Actually I'm able to scroll through on SSH logins. I'm currently using the
OpenSSH Beta. It's with Telnet that I'm not able to scroll.
Regards,
ghost added
Needs-AttentionThe core contributors need to come back around and look at this ASAP.
Hi, I'd just like to state that I'm seeing the same issue.
I'm using Terminal 1.0.1401.0
It's only happening with telnet, not SSH. I'm using the inbuilt Windows 10 telnet client.
It happens with both PowerShell and Command Prompt running in Terminal. I can successfully scroll using the old Console, with both Command Prompt and PowerShell.
After connecting to ssh, when I edit the source with vi (vim), when I scroll the mouse, strange characters are displayed. I haven't experienced it in other ssh tools.
I use the set mouse=a option in the .vimrc file. This happens when using this option.
The work around I used was wsl. wsl ~ --exec telnet 10.77.77.2
For those of you here trying to get GNS3 to use the new Windows Terminal (like me), I just want to leave a note to spare you the hours of frustration I spent trying to get it to work.
The command above launches the default WSL instance -- for me, this was a WSL2 instance. The WSL2 instance runs on a special/hidden virtual Switch, while the GNS3 VM on Hyper-V runs on the Default Switch. Communication between these two switches is restricted.
The solution is to install a WSL1 instance and specify that instance in the console application:
I confirm Alex (@shaunthorne) 's workaround is working and is an acceptable solution in this case.
I've been trying to use Windows Terminal as the default console application for GNS3 network simulation software, and had the same buffering issues everyone is talking about. Using Plink works like a charm : wt -w0 split-pane --tabColor #C678DD --colorScheme "One Half Dark" --title %d --suppressApplicationTitle plink -telnet -P %p %h
thx
This solution is not satisfying because plink does not offer command history with arrow up and down.
I spent some time trying to figure out what's going on under the hood about this telnet issue. What I see is that normally when we press RET on an empty terminal the LINE FEED (\r\n) sequences are usually sent along with some VT sequences (for placing the cursor etc.). I think the LINE FEED sequences are eventually used to set the viewport position (the request reaches up to Terminal::SetViewportPosition) when the viewport becomes larger than window, and after this point we are able to scrollback by moving the viewport. However, when I send RET while telnet is running, some VT sequences are sent, but there is no LINE FEED sequence, which means there will be no calculation effecting viewport(?). The viewport will always be at its default size and there will be no way to scrollback.
Here are sequences I get with and without telnet (I read them from Terminal::Write in Terminal.cpp).
I think nukoseer's log above is evidence that they're already using the new conpty rewrite. It appears that the Windows telnet client is scrolling the buffer with a ScrollConsoleScreenBuffer call, which we're now translating into a copy rectangle (DECCRA) sequence. That's the \x1b[2;1;30;120;;1;1$v in that log.
This is no better or worse than it was before (well except that it's now a lot more efficient). The fundamental issue is that the conhost buffer in this situation is the same size as the viewport (as has been previously mentioned), so telnet's attempt to scroll just appears to us like it's copying a block of data within the viewport.
But with the new conpty translation, it might now be possible to detect that as a special case (i.e. a ScrollConsoleScreenBuffer call covering the entire viewport) and map that to a linefeed instead of a DECCRA. I'm not convinced that's a good idea, but it's perhaps something to think about.
Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Help WantedWe encourage anyone to jump in on these.Issue-BugIt either shouldn't be doing this or needs an investigation.Priority-2A description (P2)Product-ConptyFor console issues specifically related to conpty
Activity
DHowett commentedon May 20, 2020
Hi, please make sure you're using the bug report template when you file issues.
What SSH client are you using?
sierrab1989 commentedon May 20, 2020
DHowett commentedon May 20, 2020
Cool. Which telnet client?
sierrab1989 commentedon May 21, 2020
shermp commentedon May 28, 2020
Hi, I'd just like to state that I'm seeing the same issue.
I'm using Terminal 1.0.1401.0
It's only happening with telnet, not SSH. I'm using the inbuilt Windows 10 telnet client.
It happens with both PowerShell and Command Prompt running in Terminal. I can successfully scroll using the old Console, with both Command Prompt and PowerShell.
I hope this helps.
JunhwanPark commentedon Jun 11, 2020
Hi,
I'm using Teminal Preview 1.0.1402.0
After connecting to ssh, when I edit the source with vi (vim), when I scroll the mouse, strange characters are displayed. I haven't experienced it in other ssh tools.
I use the
set mouse=aoption in the.vimrcfile. This happens when using this option.30 remaining items
tatroc commentedon Jul 14, 2022
The work around I used was wsl.
wsl ~ --exec telnet 10.77.77.2I saw others mention using plink, but when I control+c, plink would exit. Using WSL + telnet does not have this issue.
erh-git commentedon Sep 1, 2022
For those of you here trying to get GNS3 to use the new Windows Terminal (like me), I just want to leave a note to spare you the hours of frustration I spent trying to get it to work.
The command above launches the default WSL instance -- for me, this was a WSL2 instance. The WSL2 instance runs on a special/hidden virtual Switch, while the GNS3 VM on Hyper-V runs on the Default Switch. Communication between these two switches is restricted.
The solution is to install a WSL1 instance and specify that instance in the console application:
(use whichever distro you like, note that for Debian I had to
sudo apt-get install telnetas well)Then use this Distro to launch your telnet sessions:
wsl.exe -d Debian telnet 10.77.77.2(I don't know the significance of including or omitting
~ --exec, in my testing the results were the same)My final GNS3 Console Command looked like this:
wt.exe -w 0 --suppressApplicationTitle --title %d wsl.exe -d Debian telnet %h %pislandsins commentedon Jan 13, 2023
YoruguaDEV commentedon Jan 23, 2023
zadjii-msft commentedon Jan 23, 2023
Blackers33 commentedon Apr 9, 2024
This solution is not satisfying because plink does not offer command history with arrow up and down.
the original issue has not been solved yet.
nukoseer commentedon Aug 29, 2024
I spent some time trying to figure out what's going on under the hood about this
telnetissue. What I see is that normally when we pressRETon an empty terminal theLINE FEED(\r\n) sequences are usually sent along with some VT sequences (for placing the cursor etc.). I think theLINE FEEDsequences are eventually used to set the viewport position (the request reaches up toTerminal::SetViewportPosition) when the viewport becomes larger than window, and after this point we are able to scrollback by moving the viewport. However, when I sendRETwhiletelnetis running, some VT sequences are sent, but there is noLINE FEEDsequence, which means there will be no calculation effecting viewport(?). The viewport will always be at its default size and there will be no way to scrollback.Here are sequences I get with and without
telnet(I read them fromTerminal::WriteinTerminal.cpp).telneton CMD:\x1b7\x1b[0m\x1b[2;1;30;120;;1;1$v\x1b[32;30;1;30;120$x\x1b8\x1b[30;1H\x1b[30;1H\x1b7\x1b[30;1H\x1b[0mnukoseer@nukoseer:~$ \x1b8\x1b7\x1b[30;1H\x1b[0mnukoseer@nukoseer:~$ \x1b8\x1b7\x1b[0m\x1b[2;1;30;120;;1;1$v\x1b[32;30;1;30;120$x\x1b8\x1b[30;1H\x1b7\x1b[30;1H\x1b[0mnukoseer@nukoseer:~$ \x1b8\x1b7\x1b[30;1H\x1b[0mnukoseer@nukoseer:~$ \x1b8\x1b[30;22HCMD:
\x1b[4;13H\r\nC:\\Users\\PC>I don't know if this is helpful at all, but just wanted to share my findings.
zadjii-msft commentedon Aug 29, 2024
I also don't know if this just magically got better after 1.22, with the big-ol conpty rewrite.
j4james commentedon Aug 29, 2024
I think nukoseer's log above is evidence that they're already using the new conpty rewrite. It appears that the Windows telnet client is scrolling the buffer with a
ScrollConsoleScreenBuffercall, which we're now translating into a copy rectangle (DECCRA) sequence. That's the\x1b[2;1;30;120;;1;1$vin that log.This is no better or worse than it was before (well except that it's now a lot more efficient). The fundamental issue is that the conhost buffer in this situation is the same size as the viewport (as has been previously mentioned), so telnet's attempt to scroll just appears to us like it's copying a block of data within the viewport.
But with the new conpty translation, it might now be possible to detect that as a special case (i.e. a
ScrollConsoleScreenBuffercall covering the entire viewport) and map that to a linefeed instead of aDECCRA. I'm not convinced that's a good idea, but it's perhaps something to think about.Mqxx commentedon Jun 13, 2025
Any update on this?