tip(1) connect to another host with serial cable: vim display junk text

Harald Schmalzbauer harry at schmalzbauer.de
Sat Dec 9 14:30:39 PST 2006


Am Samstag, 9. Dezember 2006 09:52 schrieb 张韡武:
> Hello List.
>
> This is another stupid frequent question that might already get answered
> a thousand times, but I cannot do effective googles because the word
> 'tip' is too general.
>
> Local host is freebsd 6.1, remote host is Gentoo Linux. Both connected
> through serial cable on COM1. Now I wish to control Linux with my
> FreeBSD. This command can let me login to the Linux host
>
> $ tip com1
>
> But after I logged in I found using VIM would create junk text. It seems
> VIM do not know my terminal is very wide (more then 130 characters per
> line).
>
> So, how do I fix it? Google did give me a lot of 'tips' but none of them
> is related to my problem...

You have to tell the applications the correct terminal settings, meaning 
number of rows and columns. With ssh or something similar this is done 
automatically, with tty you would set it on FreeBSD like 'stty rows 25 cols 
80'.
'stty -a' shows some tty settings, including rows and columns.
Alternately you could set some environment variables for vi, but that doen't 
work for all applications, so stty is prefered.

Best regards,

-Harry

>
> Best Regards
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list