Unable to modify defaults.json #8624

Closed
opened 2026-01-31 01:34:03 +00:00 by claunia · 5 comments
Owner

Originally created by @shakey1 on GitHub (May 27, 2020).

Environment

Windows build number: 10.0.18363.0
Windows Terminal version (if applicable): 1.0.1401.0

Steps to reproduce

Hold down the "alt" key and open settings. The defaults.json file opens in Notepad (in my case Notepad++). When I make changes though and try to save, I either get prompted to save the file with another name (when using Notepad) or told to "Please check if this file is opened in another program" when using Notepad++ (running in administrator mode).

Expected behavior

To be able to change the settings to my liking (color schemes).

Actual behavior

The file states that it is open in another program, but I have not been able to identify it.

SaveFailed

Originally created by @shakey1 on GitHub (May 27, 2020). # Environment Windows build number: 10.0.18363.0 Windows Terminal version (if applicable): 1.0.1401.0 # Steps to reproduce Hold down the "alt" key and open settings. The defaults.json file opens in Notepad (in my case Notepad++). When I make changes though and try to save, I either get prompted to save the file with another name (when using Notepad) or told to "Please check if this file is opened in another program" when using Notepad++ (running in administrator mode). # Expected behavior To be able to change the settings to my liking (color schemes). # Actual behavior The file states that it is open in another program, but I have not been able to identify it. ![SaveFailed](https://user-images.githubusercontent.com/10562402/83041419-4e702e00-9ff5-11ea-9c9a-1d6521f06af5.PNG)
Author
Owner

@zadjii-msft commented on GitHub (May 27, 2020):

This is absolutely by design - defaults.json is a readonly reference file that merely shows the default settings for the Windows Terminal.
2af722b43d/src/cascadia/TerminalApp/defaults.json (L1)

If you'd like to change your settings, you should just edit settings.json. You might also be interested in this doc

If you'd like a setting to apply to all of your profiles, you can add it to the defaults section above the list of profiles in your settings.json file.

@zadjii-msft commented on GitHub (May 27, 2020): This is absolutely by design - `defaults.json` is a readonly reference file that merely shows the default settings for the Windows Terminal. https://github.com/microsoft/terminal/blob/2af722b43d3213858df156cc42c47e12341b836a/src/cascadia/TerminalApp/defaults.json#L1 If you'd like to change your settings, you should just edit `settings.json`. You might also be interested in [this doc](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings) > If you'd like a setting to apply to all of your profiles, you can add it to the `defaults` section above the `list` of `profiles` in your `settings.json` file.
Author
Owner

@willemavjc commented on GitHub (Sep 2, 2020):

If you'd like to change your settings, you should just edit settings.json. You might also be interested in this doc

If you'd like a setting to apply to all of your profiles, you can add it to the defaults section above the list of profiles in your settings.json file.

Seems to be no longer accurate: To get something working, I was forced to pass it to profiles property.

Example:

{
...
    "profiles":
    [
...
        {
            "guid": "...",
            "hidden": false,
            "name": "PowerShell",
            "source": "Windows.Terminal.PowershellCore",
            "fontFace": "JetBrains Mono",
            "fontSize": 10
        }
    ],
...
}
@willemavjc commented on GitHub (Sep 2, 2020): > If you'd like to change your settings, you should just edit `settings.json`. You might also be interested in [this doc](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings) > > > If you'd like a setting to apply to all of your profiles, you can add it to the `defaults` section above the `list` of `profiles` in your `settings.json` file. Seems to be no longer accurate: To get something working, I was forced to pass it to `profiles` property. Example: ``` { ... "profiles": [ ... { "guid": "...", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore", "fontFace": "JetBrains Mono", "fontSize": 10 } ], ... } ```
Author
Owner

@DHowett commented on GitHub (Sep 2, 2020):

I mean, if our settings model regressed that significantly between point releases I'm going to say you should file a totally separate bug for it instead of commenting on the one about editing a read-only file 😄

Please share a copy of your settings.json when it's in the non-working state.

@DHowett commented on GitHub (Sep 2, 2020): I mean, if our settings model regressed that significantly between point releases I'm going to say _you should file a totally separate bug for it instead of commenting on the one about editing a read-only file :smile:_ Please share a copy of your settings.json when it's in the non-working state.
Author
Owner

@willemavjc commented on GitHub (Sep 4, 2020):

I mean, if our settings model regressed that significantly between point releases I'm going to say _you should file a totally separate bug for it instead of commenting on the one about editing a read-only file

Oh right, I focused on settings.json (your response) and not on defaults.json (the question)

Please share a copy of your settings.json when it's in the non-working state.

This does not work:

    "cursorShape": "filledBox",
    "fontFace": "JetBrains Mono",
    "fontSize": 10,
    "useAcrylic": true,
    "acrylicOpacity": 0.4,
    "profiles":
    [
       ...

While this works:

    "profiles":
    [
        {
            "guid": "{...}",
            "hidden": false,
            "name": "Debian",
            "source": "Windows.Terminal.Wsl",
            "cursorShape": "filledBox",
            "fontFace": "JetBrains Mono",
            "fontSize": 10,
            "useAcrylic": true,
            "acrylicOpacity": 0.4
        },
        ...

Either I missed something or some useful feature is missing: To be able to set up some wide default profile and overload with local settings if any. I found the documentation quite unclear about this.

If you confirm the thing I could open a dedicated issue if you want.

@willemavjc commented on GitHub (Sep 4, 2020): > I mean, if our settings model regressed that significantly between point releases I'm going to say _you should file a totally separate bug for it instead of commenting on the one about editing a read-only file Oh right, I focused on `settings.json` (your response) and not on `defaults.json` (the question) > Please share a copy of your settings.json when it's in the non-working state. This does not work: ``` "cursorShape": "filledBox", "fontFace": "JetBrains Mono", "fontSize": 10, "useAcrylic": true, "acrylicOpacity": 0.4, "profiles": [ ... ``` While this works: ``` "profiles": [ { "guid": "{...}", "hidden": false, "name": "Debian", "source": "Windows.Terminal.Wsl", "cursorShape": "filledBox", "fontFace": "JetBrains Mono", "fontSize": 10, "useAcrylic": true, "acrylicOpacity": 0.4 }, ... ``` Either I missed something or some useful feature is missing: To be able to set up some wide default profile and overload with local settings if any. I found the documentation quite unclear about this. If you confirm the thing I could open a dedicated issue if you want.
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Sep 4, 2020):

@willemavjc, the value of "profiles" should be an object with properties "defaults" and "list" as shown in Profile settings in Windows Terminal and Proposal 3: Change profiles to an object with a list of profiles and a defaults object.

@KalleOlaviNiemitalo commented on GitHub (Sep 4, 2020): @willemavjc, the value of "profiles" should be an object with properties "defaults" and "list" as shown in [Profile settings in Windows Terminal](https://docs.microsoft.com/windows/terminal/customize-settings/profile-settings) and [Proposal 3: Change `profiles` to an object with a `list` of profiles and a `defaults` object](https://github.com/microsoft/terminal/blob/9279b7a73d3d6e0783ef38fa9cf2ad4406c14824/doc/specs/%232325%20-%20Default%20Profile%20Settings.md#proposal-3-change-profiles-to-an-object-with-a-list-of-profiles-and-a-defaults-object).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8624