View Full Version : tcsh: TERM: Undefined variable and rsync
david-bo
01-01-2006, 10:54 AM
I have made the changes described in the comments at
http://www.macosxhints.com/article.php?story=20020828090619956
but when I use rsync between a machine with 10.3.9 and 10.4 I get these warning and error messages:
Warning: No xauth data; using fake authentication data for X11 forwarding.
tcsh: TERM: Undefined variable.
Where can change these settings for, I guess, non-interactive shells? A new hint about this is probably motivated;-)
david-bo
01-06-2006, 03:15 PM
I just realised that several cron jobs I have setup also fails with a similar error message:
csh: TERM: Undefined variable.
(this time it is not Tcsh but csh).
My current version of /usr/share/tcsh/examples/aliases looks like this:
if ($?TERM_PROGRAM) then
if ("$TERM_PROGRAM" == "Apple_Terminal") then
alias settermtitle 'echo -n "^[]2;\!:1^G"'
endif
endif
How is this supposed to look? Or am I looking in the wrong place?
hayne
01-06-2006, 03:31 PM
Or am I looking in the wrong place?
I think you are looking in the wrong place.
The error message seems to be saying that the "TERM" variable is not defined.
The "TERM" variable is not related to the "TERM_PROGRAM" variable.
david-bo
01-12-2006, 05:40 PM
I think you are looking in the wrong place.
The error message seems to be saying that the "TERM" variable is not defined.
The "TERM" variable is not related to the "TERM_PROGRAM" variable.
Of course! Hit myself hard in the head.
Anyway, why does it complain about TERM not defined? I realised another situation when this happened:
% ssh name@host tail -f /var/log/httpd/error_log
but why does it happen with non-interactive shells???
Someone here must know, please hint me in the right direction.
hayne
01-12-2006, 07:01 PM
Does it happen if you log in using a freshly-created or uncustomized user account? If not, that would point to the problem being something that you have customized in your shell environment.
This Unix FAQ (http://forums.macosxhints.com/showthread.php?t=40648) might help if you are unclear on how the shell environment gets customized.
david-bo
01-13-2006, 04:07 AM
I got it:-)
I had the following clause in my .tcshrc:
if ("$TERM" == "xterm" ) then
source ~/.login
endif
You have to check if TERM really is defined before you do this check. This one worked for me:
if ($?TERM) then
if ("$TERM" == "xterm" ) then
source ~/.login
endif
endif
However, I wonder where I got my xterm-check from. I have a vague feeling that the source is some Mac OS X Hints hint.
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.