Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fjellvannet opened this issue Apr 15, 2024 · 8 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@fjellvannet
Copy link

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.

@fjellvannet fjellvannet added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Apr 15, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 15, 2024
Copy link

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.

@fjellvannet
Copy link
Author

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
Copy link
Author

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.

@DHowett
Copy link
Member

DHowett commented 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 DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 15, 2024
@inglepriyanka148867

This comment was marked as spam.

@fjellvannet
Copy link
Author

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

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Apr 16, 2024
@fjellvannet
Copy link
Author

see my last comment, that's the solution.

@inglepriyanka148867

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

3 participants