Link to home
Start Free TrialLog in
Avatar of sarabmann
sarabmann

asked on

rcp command? TERM environment variable not set

Hi!! ,
   I'm  aware  of remote copy command .I  have two servers OS Linux 8.0.  I  have done the relevent enteries into  .rhosts file of my user  as  well as in /etc/host.equiv .
       When my entries were  not appropriate it gives the error "permission denied" but after done appropriate entries now it gives the error .
       (TERM env is not set).
I'm working through PC and set the terminator like

export TERM=xterm

I also tried  export TERM=ansi,TERM=vt100

export DISPLAY=<computer name>:0
     
BUT I'm geting same ERR

 "TERM environment variable not set."

  Am I doing some basic  mistake?

             Thanks,
                       sm
Avatar of silentlucidity
silentlucidity

I assume you are using the appropriate shell coz the command varies depending on your default shell (export or setenv).
You could also try putting this in your.cshrc or .profile so that it gets automatically set on login.
rcp and other rsh clients do an implicit login. They do not have a terminal, and WILL misbehave if the startup scripts for sh, csh, or bash (whichever one you use) try to output to the console.
To fix this problem, you must clean up your .profile, .bashrc etc to remove any garbage being output in a non-interactive login.

For example:
If you use bash then PS1 is set if the shell is interactive so you should enclose any console output inside a condition statement like:
if [ "$PS1" ]; then
  ....
 console put statements

fi
Avatar of sarabmann

ASKER

I'm using " .bashrc" , ".bash" is a  shell  ,moreover I  also looked what it is etting by typing "env"
Set the TERM/DISPLAY in the .bashrc of your account on the remote machine ( if it isn't a common mounted file system).
If you are setting the DISPLAY environment variable, ensure that you do an xhost + or xhost + <remote machine> on your local machine.
sarabmann:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Be PAQ'd/Points No Refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Paul
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of YensidMod
YensidMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial