Console2: Window size not detected correctly for some apps

3

I installed Gow and am using plink to SSH into remote servers. The problem is, when I attempt to edit a file remotely with Vim, it doesn't utilize the entire screen's space. I changed the original command prompt's size via View > Console Window but that changed nothing.

Also, the escape key isn't sent to the remote server. So it's nearly impossible to edit files (I've had to use the old Ctrl+[ trick in Vim to get out of editing mode).

Another oddity is that if I am on the last line in the window, and attempt to go down one line in the buffer, it only updates the last line. The above text doesn't get updated.

When I attempt to use PuTTY (on its own), that is included with Gow, it works fine. When I attempt to use Vim locally it also works fine. Maybe there's some command that I need to send to plink? OR maybe there is something I would set in the .vimrc file? I was able to force the window size of Vim (on the remote server) by setting 'set lines=50' and 'set columns=180' but this is not ideal. And the single line scrolling issue is also still there.

echamber

Posted 2012-12-06T23:24:23.677

Reputation: 133

Which terminal emulator are you using? Does Gow include xterm, urxvt, or MinTTY? Or does Console2 itself support terminal emulation nowadays? – user1686 – 2012-12-06T23:50:24.363

I've experienced that problem with plink and console2 as well, and I'm afraid I don't have an answer. I tried running it through ansicon to console2 as well, which solved the screen space issue, but introduced even worse problems. Eventually I had better luck using this Windows port of OpenSSH through console2.

– Fopedush – 2012-12-06T23:56:53.150

Answers

1

PuTTY works, because it includes a full terminal emulator along with a SSH client. However, plink is designed for raw data transfer, not interactive use, and does not send the tty dimensions to the server (nor does it interpret the ANSI escape sequences).

user1686

Posted 2012-12-06T23:24:23.677

Reputation: 283 655

1This make sense. What I ended up doing to fix it is call: putty -load ENV -l user -new_console. The -new_console being the important flag. Now it attaches a PuTTY terminal session as a tab which is awesome. This solves all of my remaining problems with the editor. – echamber – 2012-12-07T06:55:47.280

1-new_console in ConEmu's feature ) – Maximus – 2012-12-08T12:58:33.403

1

This is the problem of Gow's ssh client. ConEmu's user had similar problem which was fixed after switching to "proper" ssh client (Git ssh AFAIK).

And try ConEmu as alternative console? (I'm the author)

Maximus

Posted 2012-12-06T23:24:23.677

Reputation: 19 395

"Git ssh" is a Cygwin port of OpenSSH. Cygwin has a terminal emulation layer that transparently converts between ANSI sequences and Windows console API. – user1686 – 2012-12-07T19:06:40.950

@grawity ConEmu is terminal that supports ANSI sequences internally and much more (tabs, splits, quake-style, macros, default terminal and more and more) – Maximus – 2012-12-08T12:55:58.697