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
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?
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.400The shell is started by the cygwin SSHD, not the putty side. You can try
echo $SHELL
– BowlOfRed – 2018-06-27T14:53:49.010I 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.743The reason I asked is that
set TERM=cygwin
isn't appropriate for bash. You were probably wanting something likeexport TERM=cygwin
. If you doecho $TERM
, is it set to what you've intended? – BowlOfRed – 2018-06-27T16:24:32.600If I do
echo $TERM
it is set to what I have intended in bash. And even usingexport TERM=vt100
it gives the exact result as before. Quick note: usingecho $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