Dynamic profiles Automatically run command on open #5363

Open
opened 2026-01-31 00:11:32 +00:00 by claunia · 0 comments
Owner

Originally created by @krisavi on GitHub (Dec 3, 2019).

Description of the new feature/enhancement

When I create a WSL profile manually using WSL.exe command then there is a possibility to modify start command and add to it to make it to start for example ssh session to some specific location I frequently use. Of course it would mean of changing the start command instead of having another parameter that will be run upon start of a tab with specific profile.
That functionality is missing for dynamic profiles.

Proposed technical implementation details (optional)

Field in profile.json to be able to set up a command that will be run as soon as profile is started. I have no idea how that could be named, tried to think of many, but they do not seem to be catch or self-explanatory. Some examples I thought of are "autorunCommand", "cmdAtStart".
Of course to make it more usable as you cannot make multiple profiles for dynamic profiles, then #3818 should be fixed as well. Then you could have one WSL that is regular, other one to run "sudo su" as a first command to go to elevated WSL instance, and maybe one that will be used as ssh agent by running something like "ssh user@yourFrequentSite.com"

Same parameter and functionality could be useful for other profiles that are not dynamic ones. I have seen some examples of people having multiple PS configuration with (at least seemed to be) ming64 or sys2 options set for the terminal.

Originally created by @krisavi on GitHub (Dec 3, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 When I create a WSL profile manually using WSL.exe command then there is a possibility to modify start command and add to it to make it to start for example ssh session to some specific location I frequently use. Of course it would mean of changing the start command instead of having another parameter that will be run upon start of a tab with specific profile. That functionality is missing for dynamic profiles. <!-- 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) Field in profile.json to be able to set up a command that will be run as soon as profile is started. I have no idea how that could be named, tried to think of many, but they do not seem to be catch or self-explanatory. Some examples I thought of are "autorunCommand", "cmdAtStart". Of course to make it more usable as you cannot make multiple profiles for dynamic profiles, then #3818 should be fixed as well. Then you could have one WSL that is regular, other one to run "sudo su" as a first command to go to elevated WSL instance, and maybe one that will be used as ssh agent by running something like "ssh user@yourFrequentSite.com" Same parameter and functionality could be useful for other profiles that are not dynamic ones. I have seen some examples of people having multiple PS configuration with (at least seemed to be) ming64 or sys2 options set for the terminal. <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-QuestionArea-SettingsResolution-AnsweredProduct-Terminal labels 2026-01-31 00:11:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5363