Clearer tab title for ssh-configurations immediately running a command like tmux, currently it is just OpenSSH SSH client without hostname #21526

Closed
opened 2026-01-31 07:47:09 +00:00 by claunia · 8 comments
Owner

Originally created by @fjellvannet on GitHub (Apr 15, 2024).

Description of the new feature/enhancement

It is possible to specify ssh-configurations, so instead of putting e.g. wsl.exe -d ubuntu, one can write ssh user@hostname into the command line field of the configuration to immediately ssh onto a host when a new tab is opened. When the configuration is like that, the tab title looks like this including the hostname (all good):

bilde

However, when I change the configuration to ssh user@hostname -t tmux a to immediately attach to a tmux session, I see the following:

bilde

This is not very handy, as I can't see which host I am connected to, only that it is through ssh. The behaviour is actually exactly the same if I open a powershell tab, and then run ssh user@hostname -t tmux a, also here the title now is just OpenSSH SSH client. If I only run ssh user@hostname in powershell, I see the hostname in the windowtitle as indicated in the first image.

Proposed technical implementation details (optional)

  1. A simple solution to this would be the ability to manually override the tab title for a configuration. Just always show some fixed text.

  2. The nicer solution would be to actually fix the behaviour of how the hostname is displayed when the ssh-command is run with the -t option in General, so that it also works when I manually run the command in powershell.

But as option 2 most likely is more complicated / probably requires changes in the openssh client or the powershell configuration, solution 1 would be sufficient for now.

Originally created by @fjellvannet on GitHub (Apr 15, 2024). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement It is possible to specify ssh-configurations, so instead of putting e.g. wsl.exe -d ubuntu, one can write ssh user@hostname into the command line field of the configuration to immediately ssh onto a host when a new tab is opened. When the configuration is like that, the tab title looks like this including the hostname (all good): ![bilde](https://github.com/microsoft/terminal/assets/22413504/2b8faef3-7477-4025-922c-584655468c75) However, when I change the configuration to ssh user@hostname -t tmux a to immediately attach to a tmux session, I see the following: ![bilde](https://github.com/microsoft/terminal/assets/22413504/573e84c3-ae2a-4945-92fd-320ce16d5c03) This is not very handy, as I can't see which host I am connected to, only that it is through ssh. The behaviour is actually exactly the same if I open a powershell tab, and then run ssh user@hostname -t tmux a, also here the title now is just OpenSSH SSH client. If I only run ssh user@hostname in powershell, I see the hostname in the windowtitle as indicated in the first image. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> 1. A simple solution to this would be the ability to manually override the tab title for a configuration. Just always show some fixed text. 2. The nicer solution would be to actually fix the behaviour of how the hostname is displayed when the ssh-command is run with the -t option in General, so that it also works when I manually run the command in powershell. But as option 2 most likely is more complicated / probably requires changes in the openssh client or the powershell configuration, solution 1 would be sufficient for now.
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 07:47:09 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Apr 15, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Apr 15, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [OpenSSH won't change the tab title after connecting remote while telnet has. (#4054)](https://github.com/microsoft/terminal/issues/4054), similarity score: 0.78 - [Tab names for SSH session to Windows 10 OpenSSH host (#5844)](https://github.com/microsoft/terminal/issues/5844), similarity score: 0.76 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@fjellvannet commented on GitHub (Apr 15, 2024):

The indicated closed issues are similar, but not the same. The problems indicated there have been fixed.

This issue however has not been fixed yet.

@fjellvannet commented on GitHub (Apr 15, 2024): The indicated closed issues are similar, but not the same. The problems indicated there have been fixed. This issue however has not been fixed yet.
Author
Owner

@fjellvannet commented on GitHub (Apr 15, 2024):

I found a setting for profiles that is "suppressApplicationTitle", which gives the behaviour I suggested as solution 1. The profile's name will then just be displayed instead of the applicationTitle the process itself returns.

However, solution 2 would be better if it is possible to get it to work. It is very weird that the windows openssh client only displays a default applicationTitle once the -t option is used.

@fjellvannet commented on GitHub (Apr 15, 2024): I found a setting for profiles that is "suppressApplicationTitle", which gives the behaviour I suggested as solution 1. The profile's name will then just be displayed instead of the applicationTitle the process itself returns. However, solution 2 would be better if it is possible to get it to work. It is very weird that the windows openssh client only displays a default applicationTitle once the -t option is used.
Author
Owner

@DHowett commented on GitHub (Apr 15, 2024):

A potential option 3 would be to configure tmux to properly propagate the title from its hosted application up to the terminal emulator! It looks like your shell is configured to emit a title, and that tmux is dropping it. That would also make sure that the title updates when you switch panes inside tmux.

@DHowett commented on GitHub (Apr 15, 2024): A potential option 3 would be to [configure tmux to properly propagate the title](https://github.com/tmux/tmux/wiki/Advanced-Use#pane-titles-and-the-terminal-title) from its hosted application up to the terminal emulator! It looks like your shell is configured to emit a title, and that tmux is dropping it. That would also make sure that the title updates when you switch panes inside tmux.
Author
Owner

@inglepriyanka148867 commented on GitHub (Apr 16, 2024):

you had want to update the tab title for SSH configurations when immediately running a command like tmux. Currently, it displays as "OpenSSH SSH client without hostname," which isn't clear. You could modify the code responsible for setting the tab title to make it more descriptive, perhaps including the hostname.

@inglepriyanka148867 commented on GitHub (Apr 16, 2024): you had want to update the tab title for SSH configurations when immediately running a command like tmux. Currently, it displays as "OpenSSH SSH client without hostname," which isn't clear. You could modify the code responsible for setting the tab title to make it more descriptive, perhaps including the hostname.
Author
Owner

@fjellvannet commented on GitHub (Apr 16, 2024):

A potential option 3 would be to configure tmux to properly propagate the title from its hosted application up to the terminal emulator! It looks like your shell is configured to emit a title, and that tmux is dropping it. That would also make sure that the title updates when you switch panes inside tmux.

That's genious! What a simple fix. Immediately solved my problem - better than that even. Didn't think far enough myself to realise this was the problem.

I now just added set -g set-titles on to my tmux conf.

Also, I must say that I am impressed by your insanely fast response time! Thank you so much

@fjellvannet commented on GitHub (Apr 16, 2024): > A potential option 3 would be to [configure tmux to properly propagate the title](https://github.com/tmux/tmux/wiki/Advanced-Use#pane-titles-and-the-terminal-title) from its hosted application up to the terminal emulator! It looks like your shell is configured to emit a title, and that tmux is dropping it. That would also make sure that the title updates when you switch panes inside tmux. That's genious! What a simple fix. Immediately solved my problem - better than that even. Didn't think far enough myself to realise this was the problem. I now just added set -g set-titles on to my tmux conf. Also, I must say that I am impressed by your insanely fast response time! Thank you so much
Author
Owner

@fjellvannet commented on GitHub (Apr 16, 2024):

see my last comment, that's the solution.

@fjellvannet commented on GitHub (Apr 16, 2024): see my last comment, that's the solution.
Author
Owner

@inglepriyanka148867 commented on GitHub (Apr 16, 2024):

Hello,
It's my pleasure!

On Tue, 16 Apr, 2024, 12:51 pm Lukas Neuenschwander, <
@.***> wrote:

see my last comment, that's the solution.


Reply to this email directly, view it on GitHub
https://github.com/microsoft/terminal/issues/17063#issuecomment-2058405418,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BEK54ZJ2UN7EWYW7Z3YDYU3Y5TGOXAVCNFSM6AAAAABGHWN2KGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGQYDKNBRHA
.
You are receiving this because you commented.Message ID:
@.***>

@inglepriyanka148867 commented on GitHub (Apr 16, 2024): Hello, It's my pleasure! On Tue, 16 Apr, 2024, 12:51 pm Lukas Neuenschwander, < ***@***.***> wrote: > see my last comment, that's the solution. > > — > Reply to this email directly, view it on GitHub > <https://github.com/microsoft/terminal/issues/17063#issuecomment-2058405418>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/BEK54ZJ2UN7EWYW7Z3YDYU3Y5TGOXAVCNFSM6AAAAABGHWN2KGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGQYDKNBRHA> > . > You are receiving this because you commented.Message ID: > ***@***.***> >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21526