Closed tzgarba closed 4 years ago
This is really wild. Can you share the path to the file that you are editing in Notepad++?
Sure. As I mentioned, I used the Microsoft Store install, so this is where it points me for updating settings: C:\Users\TZGARBA\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
As far as I can tell, I have permission to update it. Looking at the security tab, I have checks in all rows except "Special permissions".
One interesting side note, I also recently installed Draw.io via the Store and I couldn't associate it's file extensions because the executable ended up in a directory I couldn't reference directly. I uninstalled it and used the GitHub installer, and it worked just fine. Wondering if I need to do the same here.
So, if you open that file in Notepad or another text editor and edit it, what behavior do you get?
I've tried Notepad, Notepad++, and Visual Code. All behaved the same.
I'm playing with it now, and it seems to be somewhat better. I can save global settings, but I can't remove items from the Profiles list. As an example, I don't use Azure, so I was going to remove it from the list. It just keeps coming back.
For now, you may just want to set the azure profile to hidden: true
. One of the misbehaviors that we (unfortunately) kept from the pre-1.0 releases was the one of re-adding certain profiles (WSL distributions, powershell installation) to your settings after you removed them.
Ah, that explains it. Thanks for the tip. I'll hide that one. One more quick question, can you have two profiles that point to the same "source", but with different settings? I'm having trouble doing that as well. I want to set up my various SSH destinations as separate menu options. Thanks again.
Sure! So when you make a custom profile, leave out the source. That’s a tracking identifier terminal uses to find the auto generated profiles I mentioned above.
All you need is a “name” and a “commandline”.
Yep, that worked, in that the menu now has my additional option. Unfortunately, I wanted to use the Ubuntu option, and there's no command-line provided in the original option. That's why I assumed I needed the "source". It and the Azure option use them so I assumed that is how the option knew how to run it. I'll dig around and see if I can find some examples. Really appreciate all the help.
Fair point! That’s something we could do a lot better on.
For now, set your commandline to wsl.exe -d Ubuntu
or whatever the name of your distribution is in wsl -l
Hey, I'm using Windows Terminal v1.0.1811.0 and I'm experiencing similar issues.
Hiding the Azure profile and changing my Ubuntu profile to use "commandline": "ubuntu"
instead of the default source line enables the settings to persist.
However the settings are also not persisted if I try to change the colour schemes for profiles. For example, I'm testing by just adding "colorScheme": "Campbell"
to the defaults.
I didn't have any issues with this before I enabled the Linux Subsystem though.
I'm testing by just adding
"colorScheme": "Campbell"
to the defaults.
Wait isn't the default color scheme for all profiles already "Campbell"? Could you share your settings.json
?
I'm inclined to close this issue out since OP's issue seems to be fixed, but I'm gonna leave this open for now to try and get @thebrightspark's problem fixed.
Hmm I can't seem to reproduce the issue anymore. Still got the same version of the terminal, only thing that's really changed is that I've restarted the PC.
Regardless, here's my settings that I'm using now that previously I couldn't get working:
// This file was initially generated by Windows Terminal 1.0.1811.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
// You can add more global application settings here.
// To learn more about global settings, visit https://aka.ms/terminal-global-settings
// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": true,
// If enabled, formatted data is also copied to your clipboard
"copyFormatting": false,
// A profile specifies a command to execute paired with information about how it should look and feel.
// Each one of them will appear in the 'New Tab' dropdown,
// and can be invoked from the commandline with `wt.exe -p xxx`
// To learn more about profiles, visit https://aka.ms/terminal-profile-settings
"profiles":
{
"defaults":
{
"colorScheme": "Campbell",
"useAcrylic": true,
"acrylicOpacity": 0.7
},
"list":
[
{
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"colorScheme": "Campbell Powershell"
},
{
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "Command Prompt",
"commandline": "cmd.exe",
"hidden": false
},
{
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Ubuntu",
"source": "Windows.Terminal.Wsl"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": true,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
]
},
// Add custom color schemes to this array.
// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
"schemes": [],
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
// To learn more about selection, visit https://aka.ms/terminal-selection
{ "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
{ "command": "paste", "keys": "ctrl+v" },
// Press Ctrl+Shift+F to open the search box
{ "command": "find", "keys": "ctrl+shift+f" },
// Press Alt+Shift+D to open a new pane.
// - "split": "auto" makes this pane open in the direction that provides the most surface area.
// - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
// To learn more about panes, visit https://aka.ms/terminal-panes
{ "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
]
}
Anyways, no worries then. If I get something reproduce-able I'll raise a proper issue for it 😃
Thanks for following up!
I have tried on two computers now, and I am unable to persist changes to the settings file. The Settings menu brings up my editor (Notepad++) and I can successfully edit and save the file. However, once I return to Windows Terminal, the settings change is not reflected. When I re-edit the settings JSON file, my changes are gone.
On both computers, I was previously running the preview version of Windows Terminal. I uninstalled it before installing the latest version from the Microsoft Store.
I am running Windows 10 Pro v. 1903
Please let me know if you need any more information.