PuTTY Cygwin nano screen error

0

I have recently installed Cygwin on my Windows 7 x64 computer so I can use nano to edit files from the command line. I have also setup OpenSSH to be able to connect to it remotely using PuTTY from my work computer.

My problem is that if I try using nano with line numbering the screen in PuTTY terminal doesn't seem to update correctly as shown in the image.

nano -c test.txt

screenshot

If I use nano from Windows CMD console or using OpenSSH client it works correctly, so the problem seems to be with the PuTTY terminal.

Another problem I'm facing is that the clear command doesn't work properly when using SSH, so I had to use set TERM=cygwin to "fix" this but even then the command only skips a line and doesn't scroll the screen. I have also tried using MobaXterm but with the same results as with PuTTY.

Is there any configuration I can set to get this working properly?

jmhg92

Posted 2018-06-26T20:07:33.230

Reputation: 21

Is your login shell bash? (common for cygwin). Does running export TERM=vt100 improve the behavior at all? – BowlOfRed – 2018-06-26T23:57:14.823

@BowlOfRed If by login shell you mean the shell I use to SSH into my home computer then it is PuTTY's shell. Both computers are running Win7 x64. As for using TERM=vt100 it has the same result, perhaps even worse. – jmhg92 – 2018-06-27T13:39:48.400

The shell is started by the cygwin SSHD, not the putty side. You can try echo $SHELL – BowlOfRed – 2018-06-27T14:53:49.010

I don't use cygwin SSHD, I use OpenSSH (not sure if there is a difference or not). Running the command outputs /bin/bash – jmhg92 – 2018-06-27T16:05:25.743

The reason I asked is that set TERM=cygwin isn't appropriate for bash. You were probably wanting something like export TERM=cygwin. If you do echo $TERM, is it set to what you've intended? – BowlOfRed – 2018-06-27T16:24:32.600

If I do echo $TERM it is set to what I have intended in bash. And even using export TERM=vt100 it gives the exact result as before. Quick note: using echo $TERM directly in Windows CMD just outputs $TERM, so I have to execute bash and then use the command in order to get the TERM variable output. Also, echo %TERM% outputs the intdended TERM in Windows CMD. – jmhg92 – 2018-06-27T17:14:22.700

No answers