another tweak to use proper variable to know if we're running xterm (TERM variable).