Solved vi over ssh only shows a single line ... (?)

so this is probably something stupid, but it's kinda bugging me, and it's bound to be a problem at some point...

if I ssh into my FreeBSD vm, and I run vi (my editor of choice, pls don't judge), it clears the buffer, and only uses the (first) last line of the new terminal window...

there's a black space for the input and status output, and then a bunch of tildes as those expressed on empty lines in the vi "window".

anyone experience that?

a post on here says it has something to do with how vi handles carriage returns, but i don't understand what they're talking about...

it's not a local problem because if I run vi on other devices on my lan, it works just fine...

I think it's a terminal emulation problem, but I could be wrong...
 

Attachments

  • 2017-07-15.png
    2017-07-15.png
    1.8 MB · Views: 326
  • 2017-07-15 (1).png
    2017-07-15 (1).png
    1.8 MB · Views: 326
  • 2017-07-15 (2).png
    2017-07-15 (2).png
    1.8 MB · Views: 299
Hi poorandunlucky,

information about your remote terminal-emulation and settings could be helpful. Would you please execute tset - and stty -e on the remote system, and post the output?
 
Hi poorandunlucky,

information about your remote terminal-emulation and settings could be helpful. Would you please execute tset - and stty -e on the remote system, and post the output?

for sure, thanks... i'm not very familiar with terminal emulation... basically I just know the existence of /etc/ttys and I know about login classes and how they can affect things like that, but I never actually had to touch any of it, except to only allow root logins on the physical console at some point, I think... for security, and maybe to edit /etc/ttys for X11, for something, but that's it... I don't think I ever messed with login classes, I always just figured it was so old it probably didn't really even matter anymore, anyway, because there was probably autodetected or defaulted to a "good-for-all configuration"... anyway, on with the output ^_^'

Code:
> ssh poorandunlucky@10.0.0.100
Password:
poorandunlucky@00:~ %
poorandunlucky@00:~ % tset -
su
poorandunlucky@00:~ %
poorandunlucky@00:~ % tset -s
Erase set to backspace.
set noglob;
setenv TERM su;
setenv TERMCAP 'dumb|su|unknown:am:co#80:do=^J:';
unset noglob;
poorandunlucky@00:~ %
poorandunlucky@00:~ % stty -e
speed 9600 baud; 50 rows; 120 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
        -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
        -extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
        brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl tab3 -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
        -dtrflow -mdmbuf
discard dsusp   eof     eol     eol2    erase   erase2  intr    kill
^O      ^Y      ^D      <undef> <undef> ^H      ^H      ^C      ^U
lnext   min     quit    reprint start   status  stop    susp    time
^V      1       ^\      ^R      ^Q      ^T      ^S      ^Z      0
werase
^W
poorandunlucky@00:~ %

That's all... I don't really know what any of this means... all I know is that it emulates a physical console where things used to get printed on huge sheets of paper with punched holes on each side and green squares on each line or five lines or something like that, and the black box is essentially an emulator for that printer, so instead of printing to paper, it prints to the screen...

Maybe this is karma coming to bite me in the ass... I used to make fun of FreeBSD saying it had plug-n-play support for punch card readers since 1974 Lol

Thanks again for trying to help... I appreciate the opportunity to learn a bit more about this at the same time... I got a nice refresher going through /etc yesterday, too... I might not've bothered if this wasn't going on...

Try to change SSH client.

Why? I just wrote it worked fine - even for vi - when I connected to other boxes on my LAN... >: [
 
I guess the problem is the terminal emulation 'su'. I couldn't find a termcap entry for it.

Try setting your terminal emulation to xterm or vt100 on the remote system.

eval `tset -s xterm` or eval `tset -s vt100`
 
Back
Top