Assume I run a tmux
session on machine A and from it I start an interactive shell via ssh
to machine B.
I'd like to change machine B's PS1
to better suit the use from under tmux
; for instance, I'd include different things into the XTerm title string.
I would rather not edit machine B's settings to always show a tmux-optimized prompt. Sometimes I ssh
to machine B from a plain terminal (not tmux
) and would like it to use my regular PS1
in that case.
Is there a standard / accepted best way to achieve this?
All I came up with so far is setting AcceptEnviron
in machine B's sshd
config and pass a custom signal variable at ssh
connection time.
http://superuser.com/questions/249293/rename-tmux-window-name-to-prompt-command-ps1-or-remote-ssh-hostname
– Joe Atzberger Nov 11 '13 at 22:30