SunQuest
           BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old June 10th, 2004, 06:28 AM
OSX OSX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: On another planet
Posts: 30 OSX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Unhappy TERM and SSH - certain characters are not working as expected

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

Reply With Quote
  #2  
Old June 10th, 2004, 12:30 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is online now
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,441 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 h 12 m 9 sec
Reputation Power: 797
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

Reply With Quote
  #3  
Old June 10th, 2004, 01:45 PM
OSX OSX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: On another planet
Posts: 30 OSX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Tanks for the reply Scorpions4ever,

I have tried that though.

Any other thoughts would be most welcome

Reply With Quote
  #4  
Old June 10th, 2004, 03:11 PM
stevengs stevengs is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Germany
Posts: 394 stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 4 h 36 m 24 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
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.

Reply With Quote
  #5  
Old June 10th, 2004, 03:20 PM
OSX OSX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: On another planet
Posts: 30 OSX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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 :(

Reply With Quote
  #6  
Old June 10th, 2004, 04:21 PM
stevengs stevengs is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Germany
Posts: 394 stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 4 h 36 m 24 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
You can always use the original vi interface commands. h, j, k, l. That always works. (Have to love VI )

Reply With Quote
  #7  
Old June 10th, 2004, 06:09 PM
OSX OSX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: On another planet
Posts: 30 OSX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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:
Failing that, you can extract the cons25 and related entries from
/etc/termcap and use the captoinfo(1) command on your Linux box to
generate a terminfo database entry for the cons25 terminal type. See
eg.

http://www.freebsd.org/cgi/man.cgi?...6+9&format=html


... then it would be truly welcomed

David

Reply With Quote
  #8  
Old June 10th, 2004, 09:23 PM
stevengs stevengs is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Germany
Posts: 394 stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 4 h 36 m 24 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > TERM and SSH - certain characters are not working as expected


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway