Ok, found out some more: the origin of the error is located in .tcshrc (yes, we use tcsh).
It's in this piece of code:
Code:
if ( $term == "xterm" ) then
rs
rs
alias cwdcmd 'echo -n "\033]2;${USER}@${HOST}:$cwd\007\033]1;${HOST}\007"'
cwdcmd
else
unalias cwdcmd
endif
with "rs" an alias for "eval `resize`". It puts "myname@myhost:/home/myhome" in the terminal header,
and is obviously responsible for the weird error message when running less. What I don't get is why
cwdcmd is run at all when less is opened, does less behave like an xterm session for some odd reason?
I'd think cwdcmd would be run once, when the xterm is started, and that's it. Weird.
Commenting out this bit solves the problem, frankly I don't get the use of this code anyway (though
the header bit is neat to have). I'll probably be switching to bash anyway, much easier for scripting.
Thanks for the help all (here and at fedoraforum).