On Tuesday, May 22, 2012 at 3:12 PM, George Nachman wrote:
> Term2 adds this to your environment:
>
> TERM_PROGRAM=iTerm.app
>
> I believe Terminal.app does something similar.
Indeed, I had the same problem.
% printenv | fgrep Terminal
TERM_PROGRAM=Apple_Terminal
However, the OP said:
> Can one detect what terminal application is being used on an SSH remote host? I want to know the actual application, not TERM env in the question.
If you are logged into a Mac on the Console and using either iTerm or Terminal, you can use TERM_PROGRAM. But if you then ssh out, TERM_PROGRAM is no longer set.
At least that's how it worked for me.
So I'm not sure this will help.
TjL