I have begun using tmux recently to really improve my terminal sessions. One thing I need to be able to do is connect to a remote server, which is also running tmux. However, I have found that the current window title (denoted as #T in tmux) is not updated while within a secondary tmux shell. I would like to update the primary-tmux-session value from within the secondary session.
"#T" clearly takes on the value processed by PROMPT_COMMAND, which is a command run every time the prompt is reloaded. However, if I connect to a remote server, it opens a server-side-shell, which then opens tmux and this runs a completely new shell within the secondary-tmux session. The only way I know how to update the primary tmux window title is to reload the server-side-shell prompt, but this does not happen from within a secondary tmux session.
Is there any command to connect the two sessions so that they share #T ? I originally thought it might be doable with the terminal-overrides option, but it either does not work or I have set it up wrong.
Any thoughts or suggestions would be greatly appreciated. Thank you!
(PS. I suspect this question is better suited to superuser, but I had previously asked a question on stack-overflow. I hope this is the right forum for this sort of question)