You are not logged in.

#1 2008-03-15 09:28:44

johannesheld
Member
From: Europe/Nuremberg
Registered: 2007-08-04
Posts: 21
Website

ssh; setterm: $TERM is not defined

Hello,

if I do some things based on ssh (like scp or svn+ssh) I get a warning:
setterm: $TERM is not defined

Googling brought me this link: http://lists.debian.org/debian-user-ger … 01354.html - but the information in there doesn't really help.

Putting
TERM=xterm
into $HOME/.ssh/environment on the server and on my box doesn't help.

Any ideas?


Johannes

Offline

#2 2008-03-16 10:32:52

_nalle
Member
From: Stockholm/Sweden
Registered: 2006-01-11
Posts: 70
Website

Re: ssh; setterm: $TERM is not defined

the TERM variable is an enviroment variable.

What happens if you do: echo $TERM

If there is a return, is that terminial the one that you are using?

If not then do: export TERM=<the term you're using>

that should solved the problem


Swedish Archlinux Mirror Administrator - ftp.gigabit.nu

Offline

#3 2008-03-16 11:08:58

johannesheld
Member
From: Europe/Nuremberg
Registered: 2007-08-04
Posts: 21
Website

Re: ssh; setterm: $TERM is not defined

The shell on both clients is bash and echo $TERM reports "xterm".


Johannes

Offline

#4 2008-03-16 18:43:16

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: ssh; setterm: $TERM is not defined

Maybe there are config files for ssh and/or scp where TERM needs to be defined.

Offline

#5 2008-03-16 21:27:37

johannesheld
Member
From: Europe/Nuremberg
Registered: 2007-08-04
Posts: 21
Website

Re: ssh; setterm: $TERM is not defined

I don't really know on which side this error happens.
The server is a computer at university where I have some SVN-repositories.
My friends (some with Windows & TortoiseSVN) can work flawlessy with these repositories. But I get always this warning. With Linux and Windows.

On the linuxside I "notice" the warning but the checkout and every ssh-stuff is working.. But on the windowsside GUI-programms like TortoiseSVN tell me, that they can't write to stderr. (haha)
And I need somewhat the plink.exe that ships with TortoiseSVN because the plink.exe shipped with svn doesn't work, however.

*hmmm*


Johannes

Offline

#6 2008-03-17 16:27:06

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: ssh; setterm: $TERM is not defined

johannesheld wrote:

Hello,

if I do some things based on ssh (like scp or svn+ssh) I get a warning:
setterm: $TERM is not defined

Googling brought me this link: http://lists.debian.org/debian-user-ger … 01354.html - but the information in there doesn't really help.

Putting
TERM=xterm
into $HOME/.ssh/environment on the server and on my box doesn't help.

Any ideas?

You don't have the terminfo file for "xterm" on the remote machine. This is very common.
The proper solution is to find a machine that has xterm installed, and scp /usr/share/terminfo/x/xterm to ~/.terminfo/x/xterm

Offline

#7 2008-03-17 17:08:49

johannesheld
Member
From: Europe/Nuremberg
Registered: 2007-08-04
Posts: 21
Website

Re: ssh; setterm: $TERM is not defined

Oh, the server at university has this terminfo in /usr/share/terminfo/x/xterm (which symlinks to /lib/terminfo/xterm).
Copying this file (on the serverside) to ~ doesn't help.
My local machine has this file too.


Johannes

Offline

#8 2008-03-17 18:55:31

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: ssh; setterm: $TERM is not defined

The ssh server might not have "PermitUserEnvironment" enabled, in which case ~/.ssh/environment won't be read. You can work around this by putting something like the following in your shell's config files.

case $SSH_CLIENT in
        *.*.*.*)
                case $TERM in
                        konsole* | rxvt | xterm-color)
                                export TERM=linux
                                ;;
                        *)
                                ;;
                esac
                ;;
        *)
                ;;
esac

You obviously need to modify this to your liking, I just copied what I have in my .zshrc on my university's server. The above tells zsh to notice when I am logged in from a konsole session on my arch box at home, where TERM is set to "konsole-xf4x", and change it to "linux".

Offline

#9 2008-03-20 10:43:56

johannesheld
Member
From: Europe/Nuremberg
Registered: 2007-08-04
Posts: 21
Website

Re: ssh; setterm: $TERM is not defined

Thank you - I will try it.


Johannes

Offline

Board footer

Powered by FluxBB