-   *BSD (
-   -   Special Keys Non-Functional via TeraTerm (

Ruler2112 09-30-2008 03:09 PM

Special Keys Non-Functional via TeraTerm
I have a FreeBSD 7.0 box running as a mail server. I routinely have to update the ports on it, as well as other stuff through the console. Instead of sitting in the basement where the machine is, I ran an ethernet cable to my office and threw another NIC in the machine. I have WebMin and telnetd running to provide access for myself. (And yes, before I get 847,352 people telling me that telnet is bad and to use ssh instead, telnet is only accessible from the line going to my office. I originally tried to set up ssh, but got confused and finally just said "screw it" after an hour of playing around with it - telnet was literally 3 minutes to get going.) The pf firewall only allows connections on the WebMin and telnet port from the line going to my office for security. I plug the ethernet cable into a laptop that is used primarily for this purpose.

The problem I'm having is that I am unable to use any special keys - delete, home, page up, page down, end, insert - on the laptop when sued. I'm using TeraTerm Pro 2.3 to telnet to the FreeBSD box. I searched high and low and was able to find a sort-of solution. On the TeraTerm home page, there's a link to a teralin1.tgz file. Inside this file are instructions on how to make these keys work. I followed the directions and have it working such that if I log in as a user, the keys work in the shell. If I use su -l to become root (as I need to do in order to perform 90+% of what I use this connection for), the keys emit a ~ on the screen, but only in the shell; they work fine in vim.

The teralin1.tgz file contains information on a new terminal type, teraterm. In order to use tic to compile the terminal info file, I needed to use my Slackware box, then move the output file over to the FreeBSD machine. (The FreeBSD team, in their infinite wisdom, decided to take out this utility that takes up a whopping 43k of space at some point in the past. :confused: Just like to make life hard I guess...) I put this in /usr/share/misc/t, which is where the man page for term says to put it, but really don't know if this is correct or not. When I log in, the TERM variable is set to teraterm, as it should be according to the instructions. This is specified in the TERATERM.INI file that's also included in the same archive. There's also a keyboard.cnf file with the key mappings for TeraTerm in it; I'm using this as well.

No matter what circumstance I'm in, the end key doesn't work in vim. Instead, it just changes the case of the character the cursor is on. The rest of the keys do function as expected in vim. The end key works fine on the command line, but only when not sued.

Another thing that would be nice is to have a colored directory listing like is standard on Linux. (And yeah, I know I'm getting picky here... ;) ) There is syntax coloring in vim, so I know the terminal is capable of outputting color, but ls doesn't show anything but black & white.

Bare Questions:

How to I fix the special keys - insert, delete, home, page up, page down, end - in the shell after I su to root?

How to I fix the end key to behave as it should in vim?

How do I get a colored directory listing?

Thanks in advance for any help.

Ruler2112 10-02-2008 11:18 AM

*bump* Anyone?

robogymnast 05-05-2009 02:06 PM

I'm having the same problem - when connecting to a machine using ssh my "end" and "delete" keys just print a "~". Very annoying and I haven't found a fix yet, will post if I do.

wanghao 05-08-2009 03:03 AM

which shell you are using ?

Ruler2112 05-08-2009 11:33 AM

/bin/csh here, the default.

All times are GMT -5. The time now is 01:29 AM.