Changing of terminal header depending on local data works fine. I use terminal mostly for remote sessions (using console ssh-client). But the terminal automatically changes the header only for local session. I'll be very pleased, if it will automatically change header using ssh-client output (automatically setting in the header remote username and hostname).
Excuse me, I've forgot to add that the window title should contain the standard header: $USER@$HOST:$PATH both for local and remote session.
This is a shell thing, not something for the terminal. Please search google, there you'll find stuff like echo -n -e "\e]0;${USER}@${HOSTNAME}:${PATH}\a"
Excuse me my persistance. But. Your solution is about setting the proper shell poiner (PS1). The modification of PS1 works as it should. The problem is in translation PS1 to the terminal header. In the XFce terminal the translation of the PS1 changed by 'su' to the terminal header works fine (for each Tab). The problem is in the translation of the PS1 changed by ssh-client to the terminal header. And I think, it's the problem in application (I've seen behaviour of several terminal applications in this case).
Well it work fine here so there is probably some going wrong with the shell config. If I login on a remote server using ssh, the terminal title shows the remotename@remoteuser:remotepath. Also the terminal has no idea which child process is running, this is all handled by Gnome's VTE widget.