iterm2-tab-set icon indicating copy to clipboard operation
iterm2-tab-set copied to clipboard

Stop ssh from renaming my tab?

Open hisem opened this issue 7 years ago • 6 comments

Hi! First of all, thanks for your work on this, I'm just trying it out but it seems to fit my needs really well and seems well thought-out and documented.

This is a request that probably can't be featured in your code, but maybe you have found some kind of solution for it: can you stop ssh from renaming the tabs?

I used to rename my tabs with a simple function in my profile, and had the problem then as well, I'm just wondering if you found a solution for this.

Many thanks in advance.

hisem avatar Mar 20 '17 14:03 hisem

Tell me the scenario. What steps are happening to have ssh rename the tabs? Do a screencast if you can to show what's happening.

jonathaneunice avatar Mar 22 '17 02:03 jonathaneunice

Hey @jonathaneunice, thanks for getting back to me.

Here are some screenshots for the 3 steps that get me to this point:

  1. I named my tab "project1", everything is fine screenshot 2017-03-22 14 27 32

  2. I connect via ssh into my server on that same tab. The tab is renamed automatically. At this point I don't completely mind as it does show my current state of the tab, though I'd prefer it not to be renamed. screenshot 2017-03-22 14 28 02

  3. When I exit ssh, my tab keeps the name it had when connected via ssh to my server. If I don't do a tabset again, I keep that ssh tab name "forever". screenshot 2017-03-22 14 32 27

I'm guessing this could be fixed in some way by configuring ssh to not rename the tabs or something. Does this happen with your iTerm? Did you fix it or do you have any way around it?

Again, this is not really linked to tabset (I think), sorry!

hisem avatar Mar 22 '17 13:03 hisem

Hello,

by any chance are you on debian/ubuntu?

I had the same problem and found out that the default .bashrc-something file was sending the control code to rename the tab. Look for code like that:

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

Offirmo avatar Sep 01 '17 23:09 Offirmo

@Offirmo Hi, thanks for your input.

No, I'm on mac and use zsh. I checked my .zshrc file but I didn't find anything of the sort...

hisem avatar Sep 04 '17 10:09 hisem

maybe you need to set DISABLE_AUTO_TITLE="true" in your ~/.zshrc? I had to do that to keep ZSH from stealing the title back to the pwd after tabset was run.

jakeonrails avatar Nov 20 '17 19:11 jakeonrails

@jakeonrails Thanks for the tip, but I already have that option on... The only thing that "steals the title back" now is ssh, and that option doesn't do its magic for that.

hisem avatar Nov 20 '17 19:11 hisem