|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi All,
If I SSH from my FreeBSD machince to a Linux machine for example then if I try editing a file with vi it gives me an error saying: vi: cons25: unknown terminal type. I have tried editing /etc/ttys on the FreeBSD machine to xterm or vt100, this allows me to open a file on the Linux machine with vi but if I try using the cursor keys they print out characters to the screen. The above is true for new installs of both FreeBSD and Linux. Does anyone know what is wrong and what I need to do to fix it? (PS - if it's helpful, using Putty from Windows to the Linux or FreeBSD machine works fine.) Thanks, David |
|
#2
|
||||
|
||||
|
Have you tried doing this after ssh-ing into the linux machine:
(if using bash shell): export TERM=vt100 (if using csh or tcsh shell): setenv TERM vt100
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#3
|
|||
|
|||
|
Tanks for the reply Scorpions4ever,
I have tried that though. ![]() Any other thoughts would be most welcome ![]() |
|
#4
|
|||
|
|||
|
I remember having similiar problems, and fiddle-screwing around with the profile and .bashrc scripts til if finally did what I wanted. Since then, I basically just copy them. Somewhere along the way I stopped using linux and I think I changed my startup scripts a bit. I have a hard time remembering which script is applied under which circumstances, (login/nonlogin...tcsh/bash). I may have jotted down something about it, if I can find it I'll let you know. If anyone else is sure when which script is run, by all means...
I assume you use bash, since you said you tried the export Befehl above. Otherwise you'd have had to use setenv. I would suggest you try setting the TERM to xterm before you connect to the remote host. If that works, you can add the export to the correct script, be it .bash_profile, .bashrc, .login, .profile, (or the defaults in /etc) With FreeBSD 4.7-4.9, I used cons25 only while working directly on the console. Otherwise I used xterm. When I upgraded from 4.9 to 4.10, I noticed during the mergemaster that my old ttys file was corrupt. On my current system I did not need to make any changes to any of the startup files. I am installing Linux on a test box to see how it interacts right now. Maybe I'll know more soon. |
|
#5
|
|||
|
|||
|
Thanks stevengs,
Yeah, I'm using BASH. I havent tried tcsh or any other shell. I've tried exporting xterm and vt100 as well as editing the /etc/ttys. None of this worked :( |
|
#6
|
|||
|
|||
|
You can always use the original vi interface commands. h, j, k, l. That always works. (Have to love VI
) |
|
#7
|
|||
|
|||
|
FYI,
I've asked around on UK Freebsd mailing list and basically the problem /solution is this. Linux doesn't support cons25. Apparently it can be imported into Linux but doing this appears somewhat difficult to a relative newbie like me, so if anyone has any experience on this: Quote:
... then it would be truly welcomed ![]() David |
|
#8
|
|||
|
|||
|
that sounds cool. I'll definitely give that a try. Have the same problems with Solaris, but I do not have the priveleges required on that system.... I'll get back to ya.. (might take a few days...) Until then, in emergencies use the standard vi interface.
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > TERM and SSH - certain characters are not working as expected |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|