Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ssh "TERM is not defined."

345 views
Skip to first unread message

bl8n8r

unread,
Jun 11, 2008, 9:59:25 AM6/11/08
to
Hello all.
just fyi, I ran across this error message while using rsnapshot/ssh
between a couple boxes. /etc/bashrc uses setterm to disable the
terminal bell (setterm -blength 0) however the ssh session sets the
TERM environment variable to "dumb", which setterm knows nothing about
(apparently). Adding the if statement around my setterm commands
fixes the "$TERM is not defined" error message.

# ssh sets TERM to dumb when using scp or other...
if [ "$TERM" != "dumb" ]; then
setterm -blength 0
setterm -bfreq 0
fi

Lew Pitcher

unread,
Jun 11, 2008, 10:58:15 AM6/11/08
to
In alt.os.linux, bl8n8r wrote:

> Hello all.
> just fyi, I ran across this error message while using rsnapshot/ssh
> between a couple boxes. /etc/bashrc uses setterm to disable the
> terminal bell (setterm -blength 0) however the ssh session sets the
> TERM environment variable to "dumb", which setterm knows nothing about
> (apparently).

This points to a faulty or incomplete terminfo database. There /should/ be
an entry for the (historic) "dumb" terminal in your /usr/share/terminfo
directory tree (fil /usr/share/terminfo/d/dumb).

On my Slackware 12 system, this "dumb" device decomposes (via infocmp(1m) )
to the definition
~ $ infocmp dumb
# Reconstructed via infocmp from file: /usr/share/terminfo/d/dumb
dumb|80-column dumb tty,
am,
cols#80,
bel=^G, cr=^M, cud1=^J, ind=^J,
You should be able to use the infotocap(1m) utility to convert this
definition into a useable terminfo file

> Adding the if statement around my setterm commands
> fixes the "$TERM is not defined" error message.

"Fixes", as in "works around the configuration error"


> # ssh sets TERM to dumb when using scp or other...
> if [ "$TERM" != "dumb" ]; then
> setterm -blength 0
> setterm -bfreq 0
> fi

--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------


0 new messages