Add session concept to terminal like tmux #14118

Closed
opened 2026-01-31 04:01:26 +00:00 by claunia · 11 comments
Owner

Originally created by @soroshsabz on GitHub (Jun 4, 2021).

Description of the new feature/enhancement

I think Panes #1000 and tabs is very similar functionality to tmux , but I think very important feature in this area is missing that calls session. if we have session concept in terminal, we can have many opportunity like

  • share screen (it is very useful and cool)
  • panes settlement management
  • configuration management
  • tab settlement management
  • export and save whole situation and restore them when we need in tomorrow.
  • etc.
Originally created by @soroshsabz on GitHub (Jun 4, 2021). # Description of the new feature/enhancement I think [Panes](https://docs.microsoft.com/en-us/windows/terminal/panes) #1000 and tabs is very similar functionality to [tmux](https://github.com/tmux/tmux) , but I think very important feature in this area is missing that calls [session](https://linuxize.com/post/getting-started-with-tmux/#starting-your-first-tmux-session). if we have session concept in terminal, we can have many opportunity like * share screen (it is very useful and cool) * panes settlement management * configuration management * tab settlement management * export and save whole situation and restore them when we need in tomorrow. * etc.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 04:01:26 +00:00
Author
Owner

@skyline75489 commented on GitHub (Jun 4, 2021):

#3656 is about integration with actual tmux (most likely running inside WSL or through SSH).

I think you're lokking for #960 & #961 .

@skyline75489 commented on GitHub (Jun 4, 2021): #3656 is about integration with actual tmux (most likely running inside WSL or through SSH). I think you're lokking for #960 & #961 .
Author
Owner

@soroshsabz commented on GitHub (Jun 4, 2021):

@skyline75489 ok you right, I think if we gather together all of them (such as restore tab, restore panes, etc) in one unified concept such as session is very better approach and have many benefit more than development individually.

I think attachment and detachment feature in session concept is very powerful and useful

@soroshsabz commented on GitHub (Jun 4, 2021): @skyline75489 ok you right, I think if we gather together all of them (such as restore tab, restore panes, etc) in one unified concept such as session is very better approach and have many benefit more than development individually. I think attachment and detachment feature in session concept is very powerful and useful
Author
Owner

@skyline75489 commented on GitHub (Jun 4, 2021):

As a tmux user myself, I understand what you mean. Theoretically, there's two paths worth investigating:

  1. Implement tmux control mode (#3656) and bring tmux on Windows (https://github.com/tmux/tmux/issues/2575).
  2. Implement the session mechanism (#961).

Practically, #3656 is possible, but requires a lot of work. And https://github.com/tmux/tmux/issues/2575 is almost impossible, Believe me, I tried. Finally I myself consider #961 very hard, especially with the limited engineering power of the dev team (see the repo contributor list and you'll understand).

So yeah. I'd love the feature but I wouldn't get my hopes up right now.

@skyline75489 commented on GitHub (Jun 4, 2021): As a tmux user myself, I understand what you mean. Theoretically, there's two paths worth investigating: 1. Implement tmux control mode (#3656) and bring tmux on Windows (https://github.com/tmux/tmux/issues/2575). 2. Implement the session mechanism (#961). Practically, #3656 is possible, but requires a lot of work. And https://github.com/tmux/tmux/issues/2575 is almost impossible, Believe me, I tried. Finally I myself consider #961 *very* hard, especially with the limited engineering power of the dev team (see the repo contributor list and you'll understand). So yeah. I'd love the feature but I wouldn't get my hopes up right now.
Author
Owner

@soroshsabz commented on GitHub (Jun 4, 2021):

@skyline75489 thanks for reply me :)

I think when Microsoft Windows Terminal approach to achieve panes and tabs natively, it is necessary to create (reinvent from tmux) session concept natively to support all of these features in productive way.

@soroshsabz commented on GitHub (Jun 4, 2021): @skyline75489 thanks for reply me :) I think when Microsoft Windows Terminal approach to achieve panes and tabs natively, it is necessary to create (reinvent from tmux) session concept natively to support all of these features in productive way.
Author
Owner

@skyline75489 commented on GitHub (Jun 4, 2021):

You’re welcome. In the meantime you can use wt.exe to do some sort of session-like operation. See https://docs.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows

@skyline75489 commented on GitHub (Jun 4, 2021): You’re welcome. In the meantime you can use wt.exe to do some sort of session-like operation. See https://docs.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows
Author
Owner

@soroshsabz commented on GitHub (Jun 5, 2021):

@skyline75489 very thanks to response me, but I think this feature is very useful and important for Windows Terminal, so I think it is good to not close this issue, and I hope to Microsoft make invest on that :)

@soroshsabz commented on GitHub (Jun 5, 2021): @skyline75489 very thanks to response me, but I think this feature is very useful and important for Windows Terminal, so I think it is good to not close this issue, and I hope to Microsoft make invest on that :)
Author
Owner

@zadjii-msft commented on GitHub (Jul 6, 2021):

For reference, I workaround this with a command in the command palette. I like to do like the following each time I boot up the Terminal in the morning:

{ "command": { "action": "wt", "commandline": "new-tab --title OpenConsole cmd.exe /k #work 15 ; split-pane -s .30 --title OpenConsole cmd.exe /k #work 15 ; split-pane  -s .25 -H cmd.exe /k media ; new-tab --title \"Symbols Script\" powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu 18.04\" ; new-tab -p \"microsoft/Terminal\" ; sp -V -p \"microsoft/Terminal\" ; sp -H -p \"microsoft/Terminal\" ; focus-tab -t 0" }, "name": "Good Morning" },

(you could probably make it shorter by replacing new-tab/split-pane with nt/sp, respectively).

I add that to the keybindings/actions. This creates a new command in the Command Palette named "Good Morning". That opens up a few tabs & panes, running various build environments. I like having it in a command rather than startupActions, because I only really want this in one terminal window, not every single one I launch. It's personal taste.

You could repeat this for multiple different "session"s if you wanted. That way you could have layouts pre-defined for various different dev environments.

There's also #5465 for "load commandlines from a file. That would be another way of having tmux-like sessions that you could compose in a file and load at runtime.

I think altogether, this ask sits somewhere between #961, #766, #1571, and #5465. So I'll just close this as a dupe of all those. Thanks!

/dup #961
/dup #766
/dup #1571
/dup #5465

@zadjii-msft commented on GitHub (Jul 6, 2021): For reference, I workaround this with a command in the [command palette](https://docs.microsoft.com/en-us/windows/terminal/command-palette). I like to do like the following each time I boot up the Terminal in the morning: ```json { "command": { "action": "wt", "commandline": "new-tab --title OpenConsole cmd.exe /k #work 15 ; split-pane -s .30 --title OpenConsole cmd.exe /k #work 15 ; split-pane -s .25 -H cmd.exe /k media ; new-tab --title \"Symbols Script\" powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu 18.04\" ; new-tab -p \"microsoft/Terminal\" ; sp -V -p \"microsoft/Terminal\" ; sp -H -p \"microsoft/Terminal\" ; focus-tab -t 0" }, "name": "Good Morning" }, ``` (you could probably make it shorter by replacing `new-tab`/`split-pane` with `nt`/`sp`, respectively). I add that to the `keybindings`/`actions`. This creates a new command in the [Command Palette](https://docs.microsoft.com/en-us/windows/terminal/command-palette) named "Good Morning". That opens up a few tabs & panes, running various build environments. I like having it in a command rather than `startupActions`, because I only really want this in _one_ terminal window, not _every single one I launch_. It's personal taste. You could repeat this for multiple different "session"s if you wanted. That way you could have layouts pre-defined for various different dev environments. There's also #5465 for "load commandlines from a file. That would be another way of having tmux-like sessions that you could compose in a file and load at runtime. I think altogether, this ask sits somewhere between #961, #766, #1571, and #5465. So I'll just close this as a dupe of all those. Thanks! /dup #961 /dup #766 /dup #1571 /dup #5465
Author
Owner

@ghost commented on GitHub (Jul 6, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jul 6, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@soroshsabz commented on GitHub (Sep 2, 2021):

@zadjii-msft @msftbot I think this issue is not duplicate, because one of the very useful and powerful feature like

  • share screen (it is very useful and cool)

does not see in #961 #766 #1571 #5465

I think this issue must be reopen @zadjii-msft

/no-dup #961
/no-dup #766
/no-dup #1571
/no-dup #5465

@soroshsabz commented on GitHub (Sep 2, 2021): @zadjii-msft @msftbot I think this issue is not duplicate, because one of the very useful and powerful feature like * share screen (it is very useful and cool) does not see in #961 #766 #1571 #5465 I think this issue must be reopen @zadjii-msft /no-dup #961 /no-dup #766 /no-dup #1571 /no-dup #5465
Author
Owner

@zadjii-msft commented on GitHub (Sep 2, 2021):

Okay sorry, the other 4 bullet points though I think were covered in the threads I linked.

Could you elaborate on how you're using tmux sessions to share your screen?

@zadjii-msft commented on GitHub (Sep 2, 2021): Okay sorry, the other 4 bullet points though I think were covered in the threads I linked. Could you elaborate on how you're using tmux sessions to share your screen?
Author
Owner

@soroshsabz commented on GitHub (Sep 2, 2021):

we have many VMs ( for example lab or production ) that run many tmux sessions on each of them, (each session for one person) when I want to share my workspace (tmux panes and tabs and all data showing into that) with my colleague, I simple send vm name and tmux session name to my colleague, (he simple connect to VM and attach to my tmux session) and we can work together easily. and sharing same view of work and workspace.

I think tmux attach session feature is very popular features in Linux developer and DevOps ( I see this in many teams )

@soroshsabz commented on GitHub (Sep 2, 2021): we have many VMs ( for example lab or production ) that run many tmux sessions on each of them, (each session for one person) when I want to share my workspace (tmux panes and tabs and all data showing into that) with my colleague, I simple send vm name and tmux session name to my colleague, (he simple connect to VM and attach to my tmux session) and we can work together easily. and sharing same view of work and workspace. I think tmux attach session feature is very popular features in Linux developer and DevOps ( I see this in many teams )
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14118