Resurrecting this old thread because bits of this setup break for me every now and then and I never figure out why…
First, let me just explain how I use iTerm… I have lots of long-running ssh sessions that I like to keep open regardless of where I am.
- So I run iTerm2 on my laptop (but not tmux)
- I have a host “in the cloud” where tmux is installed (the “jumphost”)
- I ssh (with agent forwarding) to the jumphost
- I run “tmux -CC” (with a wrapper to persist/deal with the auth sock when I disconnect/reconnect)
- I open a ton of windows/tabs ssh’d to various hosts
- I can then freely disconnect/reconnect to this jumphost and re-attach to the tmux session at will
Does that make sense? I think more commonly you have users that run tmux on their local Mac. That’s handy, but it becomes unworkable under a few situations:
- You take your laptop somewhere to work and you want to resume your session
- Your internet connection has an outage long enough to time out ssh sessions
- You want to move all your sessions from one mac to another (or share them even)
So that’s the how/why…
Questions:
- Currently I’m seeing my tab titles not being set. Is this still the correct escape sequence to set the title?
printf "\033];MY_NEW_TITLE\007"
- Is there a way to gather some debug info from iterm? Is there a way I can see what it’s doing when I run the printf (or echo) command and nothing happens?
- Are there special rules about setting titles when in a tmux session? Is there some documentation on what’s allowed/not allowed when running tmux (for example, that “ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX” variable)?
- In general, what are debugging options for shell integration and tmux so that I’m just not randomly clobbering a bunch of dotfiles to see where the problem is?
- Do you generally support the scenario above (with the ssh jumphost) or am I just a total weirdo in wanting to always persist a bunch of sessions?
Thanks,
Charles