TERM settings

I noticed now when I shell in with telnet from my Solaris host, kiki says "tcsh: No entry for terminal type “dtterm"
tcsh: using dumb terminal settings.” and vim doesn’t hardly work until I change TERM to vt100. What happened to dtterm and what’s a good alternative TERM in this situation?

Also, I don’t see TERM getting set in my kiki account .cshrc. Where do I change my default TERM setting on kiki?

If support won’t do it for you, you can always compile your own terminfo database, including an appropriate entry for dterm (using tic) and put it in ~/.terminfo.

I think you can find a source terminfo file on the ncurses site, but don’t quote me on that.

It’s not getting set explicitly by your .cshrc or the system-wide shell init files - it’s being set based on the TERM string sent by your client. If you want to change it, you could do something like

setenv TERM foo

that’s at the risk of causing problems when you access it from a terminal other than foo…

if ($TERM == “dtterm”) setenv TERM foo
would be a little safer.

Really, the problem here is the missing terminfo entry for your terminal type - so the best solution is to obtain the proper terminfo file.

% mkdir .terminfo
% lynx -dump http://www.catb.org/~esr/terminfo/termtypes.ti.gz > termtypes.ti
% tic -c termtypes.ti

And in your .cshrc:
setenv TERMINFO $HOME/.terminfo

I think my sessions start in c shell by default, so I’d set my TERM in .cshrc, right? I don’t know what changed recently or where my session is picking up that my TERM is dtterm or even what dtterm is. I haven’t edited the .cshrc that the system provided for me which is:

$Id: .cshrc,v 1.2 2000/11/09 04:55:14 sage Exp $

Luis Francisco Gonzalez luisgh@debian.org based on that of Vadik Vygonets

Please check /usr/doc/tcsh/examples/cshrc to see other possible values.

if ( $?prompt ) then
set autoexpand
set autolist
set cdpath = ( ~ )
set pushdtohome

set savehist=10000
set histfile=~/.history

Load aliases from ~/.alias

if ( -e ~/.alias ) source ~/.alias


xterm seems to work well for me. e.g.With xterm, vim again gives me colored numbers when I specify :set number. I’ll just put setenv TERM xterm in the .cshrc outside of the if.

dtterm is the default terminal program on some versions of Solaris. The terminal client itself is sending that as its terminal string. Once again, this is not something that should be set explicitly in your .cshrc (even with the if statement).

The proper approach is to use the correct terminfo description for the terminal type you’re using. xterm is probably close enough to work for most stuff (esp. since the two are very similar, IIRC), but you will probably end up having problems at some point. Looking at the definitions for both in the file I referenced, there are some differences between the two.

Building your own terminfo database should work best (or just write support and see if they can add the definition for dtterm in /usr/share/terminfo, preferably system-wide).

Not sure if Sun distributes a “regular” xterm client as well.

Wow, this is resolving a bunch of stuff I didn’t know. I tried telnetting from windows and from a Solaris 9 xterm, and didn’t get the ddterm warning. Solaris 9 xterm gives me good terminal functions on kiki too. So the terminal sends the host something to announce what kind of terminal it is? How does it do that?

I was disappointed when I upgraded from Solaris 8 to Solaris 9 a couple years ago and was forced to adapt to CDE rather than OpenWin and particularly missed Sun’s cmdtool. I guess ddterm is what CDE uses. What kind of progress is this? I asked Sun after I made the upgrade how to call the new terminal tool in a script and the guy I was talking to didn’t know what I was talking about.

Ok, I tired bringing in that termtypes.ti.gz file. Tic got through some but then started complaining:
tic -c termtypes.ti
"termtypes.ti", line 920, col 1, terminal ‘cons25r-m’: Illegal character (expected alphanumeric or @%&!#) - (
“termtypes.ti”, line 1632, col 27, terminal ‘cons25r-m’: Illegal character -
“termtypes.ti”, line 1632, col 27, terminal ‘cons25r-m’: unknown capability ‘vt420pcdos’
“termtypes.ti”, line 1632, col 29, terminal ‘cons25r-m’: Illegal character (expected alphanumeric or @%&
!#) - ,
“termtypes.ti”, line 2793, col 22, terminal ‘cons25r-m’: Illegal character (expected alphanumeric or @%&!#) - ;
“termtypes.ti”, line 4969, col 12, terminal ‘cons25r-m’: Illegal character - `
“termtypes.ti”, line 4969, col 12, terminal ‘cons25r-m’: unknown capability ‘E’
“termtypes.ti”, line 4969, col 14, terminal ‘cons25r-m’: Illegal character - $
“termtypes.ti”, line 4969, col 14, terminal ‘cons25r-m’: unknown capability ‘9’
“termtypes.ti”, line 4969, col 15, terminal ‘cons25r-m’: Illegal character (expected alphanumeric or @%&
!#) - <

Added setenv TERMINFO $HOME/.terminfo to .cshrc
but now I can’t telnet into kiki from any terminal. Should have maybe checked to see if there was anything in .terminfo. Do you have any ideas on how I can break in?

I thought of a way to get back in. I opened an ftp session from a terminal on my Solaris box, got the .cshrc file from kiki, edited out the TERMINFO line, and put it back to kiki. So now I’m back in, ready to work on the original problem.

D’oh. I’m guessing some control characters are getting squished the first way or something.

Also, tic -c just checks the syntax, doesn’t actually compile the terminfo database - I should have RTFM a little better. I’m 0 for 0 here. So… try:

% wget http://www.catb.org/~esr/terminfo/termtypes.ti.gz
% gunzip termtypes.ti.gz
% tic termtypes.ti
(this works for me)

As far as getting access now that things are hosed, if you have another user on the machine, you could try suing to your user (with a different shell) like:

otheruser% su -s/bin/bash - youruser

Or change your shell to bash temporarily from the panel, or have support remove that line from your .cshrc. Looks like because of that error, nothing got stuck in ~/.terminfo. I would highly suggest leaving your terminal open and logging in from another one before you logout.

Anyway, sorry for screwing you up - but looks like you got access somehow.

Works for me now. Kiki now knows what ddterm is, no complaints at log in and the term functions I checked in vim are working.

Oh, yeah, I do have a different user on kiki that’s not just an FTP user. That su trick would work well.

The only other problem I noticed is that I can’t exit from man. I’ll page down to the bottom, and get stuck at the end line:

Manual page tic(1) line 197/221 (END)

If you type q, does it quit? That’s a feature, not a bug.

If you prefer the other behavior, you could either do:
setenv PAGER more
(to use “more” instead of “less” as your pager)

or leave less as your pager, and put:
setenv LESS e
in your .cshrc

(see the less man page for more possible options).

“q” does works to get out of a man display. On my Solaris system, man stops itself when I get to the end of the entry. Is that a Linux feature? Why is it it better to require the user to type a q?

See the previous message, but I’ll try to explain a little more.

This has to do with what pager is being used, and not with the system itself. Solaris uses “more” as the default pager, most Linux distributions use “less”.

This is the default behavior of less… it’s helpful because you don’t accidentally get kicked out when you might want to page back up and continue reading. More doesn’t let you page up, so I guess it’s not really necessary. As mentioned before, less has an option to override this behavior.

Less is installed on Solaris as well - it’s just not the default pager (at least in 8-9 - not sure about 10).

uname -srm

SunOS 5.8 sun4m

which less


I see how less works on my Solaris system. Thanks, Will.

I’ve been threatening to put Linux on an old PC here to see how it works for myself.

Do you have any ideas why Sun and Linux dropped cmdtool windows? I liked cmdtool for the ability to go back and edit a command line before hitting a return. Is it just that bash makes cmdtool superfluous?