Unable to launch with custom profile #17570

Closed
opened 2026-01-31 05:46:18 +00:00 by claunia · 7 comments
Owner

Originally created by @jredfox on GitHub (May 25, 2022).

Description of the new feature/enhancement

I want to have a dynamic profile which windows terminal can execute from command line. wt -p "<pathToProfile.json>" instead of giving it a set profile name and it only looking for the global settings.json. I am making a command line program and really don't want to have to edit a global settings.json every time a new background color / icon gets changed as editing that file may not be possible if it's already running in another instance.

Proposed technical implementation details (optional)

I want to have a custom profile json on command line boot which I looked for hours and it doesn't exist.

Originally created by @jredfox on GitHub (May 25, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 I want to have a dynamic profile which windows terminal can execute from command line. `wt -p "<pathToProfile.json>"` instead of giving it a set profile name and it only looking for the global settings.json. I am making a command line program and really don't want to have to edit a global settings.json every time a new background color / icon gets changed as editing that file may not be possible if it's already running in another instance. # Proposed technical implementation details (optional) I want to have a custom profile json on command line boot which I looked for hours and it doesn't exist.
claunia added the Issue-QuestionResolution-AnsweredResolution-Duplicate labels 2026-01-31 05:46:18 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 25, 2022):

Could you maybe elaborate more on what you're trying to do with

I am making a command line program and really don't want to have to edit a global settings.json every time a new background color / icon gets changed

Fragments might fit the bill for what you're doing here. FWIW, the terminal's settings.json file can totally be written to while the Terminal is running. The Terminal should even be able to pick up those changes and hot-reload them. This has been used before to hilarious extent

@zadjii-msft commented on GitHub (May 25, 2022): Could you maybe elaborate more on what you're trying to do with > I am making a command line program and really don't want to have to edit a global settings.json every time a new background color / icon gets changed [Fragments ](https://docs.microsoft.com/en-us/windows/terminal/json-fragment-extensions) might fit the bill for what you're doing here. FWIW, the terminal's `settings.json` file can totally be written to while the Terminal is running. The Terminal should even be able to pick up those changes and hot-reload them. This has been used before [to hilarious extent](https://www.hanselman.com/blog/adding-reaction-gifs-for-your-build-system-and-the-windows-terminal)
Author
Owner

@jredfox commented on GitHub (May 25, 2022):

I need to dynamically detect the terminal exe icon it's executing and other settings as a custom profile. For example cmd as the terminal Java as the icon.

@jredfox commented on GitHub (May 25, 2022): I need to dynamically detect the terminal exe icon it's executing and other settings as a custom profile. For example cmd as the terminal Java as the icon.
Author
Owner

@jredfox commented on GitHub (May 25, 2022):

basically I launch it check if my custom json profile exists if not create it. Then I launch it using wt -p "directory/to/my/CustomProfile.json"

@jredfox commented on GitHub (May 25, 2022): basically I launch it check if my custom json profile exists if not create it. Then I launch it using `wt -p "directory/to/my/CustomProfile.json"`
Author
Owner

@zadjii-msft commented on GitHub (Aug 1, 2022):

Wait that's not how the commandline arguments for the Terminal work at all. You can't specify the path to another file of settings to use.

For your scenario, you definitely want to create the profile as a fragment profile, stick it in one of the fragments paths (whatever's more relevant for your type of application), and then you should be able to invoke that profile with wt -p {name of the profile you generated}

@zadjii-msft commented on GitHub (Aug 1, 2022): Wait that's not how the commandline arguments for the Terminal work at all. You can't specify the path to another file of settings to use. For your scenario, you definitely want to create the profile as a fragment profile, stick it in one of the fragments paths (whatever's more relevant for your type of application), and then you should be able to invoke that profile with `wt -p {name of the profile you generated}`
Author
Owner

@jredfox commented on GitHub (Aug 3, 2022):

I know it's not in there yet that's why I wanted to specify a path or directory of paths to search for profile jsons and color jsons

@jredfox commented on GitHub (Aug 3, 2022): I know it's not in there yet that's why I wanted to specify a path or directory of paths to search for profile jsons and color jsons
Author
Owner

@zadjii-msft commented on GitHub (Aug 3, 2022):

We're tracking that specific request in /dup #6687. I suspect that fragment profiles will work for your use case today though.

@zadjii-msft commented on GitHub (Aug 3, 2022): We're tracking that specific request in /dup #6687. I suspect that fragment profiles will work for your use case today though.
Author
Owner

@ghost commented on GitHub (Aug 3, 2022):

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 (Aug 3, 2022): 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17570