terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Access to adjust defaults/settings

Open mintyc opened this issue 5 years ago • 5 comments

Windows Terminal version (or Windows build number)

10.0.19042.867 1.6.10571.0

Other Software

Latest WSL2 Ubuntu

Steps to reproduce

My end goal is to set the default terminal to an Ubuntu one that has a different StartingDirectory (in WSL$)

I didn't have the Windows Terminal preview, so could not follow https://docs.microsoft.com/en-us/windows/terminal/customize-settings/startup Aside: I did actually install this and use the settings GUI but still couldn't change the starting directory for Ubuntu It persists as %USERPROFILE% despite attempts to edit and use other forms like \wsl$\Ubuntu\home\paul (as reported by 'wslpath -w .' in the desired directory or an escaped equivalent. Can't get any alternative containing wsl$ to work, so still stuck.

Back to the 'manual' method editing JSON...

Before I follow (conflicting and out of date probably) advice in other threads such as https://github.com/microsoft/terminal/issues/2743 on files to edit, I can't even get into the directory on the windows host to change things.

My understanding is that the json files are in C:\Program Files\WindowsApps\ in a windows terminal sub directory.

I cannot however access to view the WindowsApps directory even as administrator. Controlled by TrustedInstaller and I cannot figure how to access.

Expected Behavior

A sensible, easy to use way to configure the terminal settings - preview version is a good start but doesn't actually seem to help with StartingDirectory - kind of the point

Actual Behavior

A mess of complications, and very difficult to track what is actually going on since many descriptions or older issues no longer apply.

mintyc avatar Mar 21 '21 13:03 mintyc

Huh? When you choose the “Settings” menu item you should be presented with a text editor pointing at the correct settings file. You can put any settings you want (including startingDirectory) into any of the profile blocks in that file.

There is no reason to edit the built-in settings document, as it is only a reference for what Terminal does and is not actually used. Any changes you make to the package folder can destabilize the system (please do not change its ACLs; windows really hates that: #9452).

I don’t understand the assertion that you don’t have preview and that preview doesn’t help with setting the starting directory? It absolutely does have that setting...

DHowett avatar Mar 21 '21 16:03 DHowett

Ah, I understand the preview issue now. The easiest way to help us determine whether there is a bug in settings or in WSL is to try to set the starting directory to something like C:\ and seeing if that sticks. The \\wsl$ network provider is flaky and sometimes fails to work properly.

DHowett avatar Mar 21 '21 16:03 DHowett

Ah, I understand the preview issue now. The easiest way to help us determine whether there is a bug in settings or in WSL is to try to set the starting directory to something like C:\ and seeing if that sticks. The \\wsl$ network provider is flaky and sometimes fails to work properly.

Thank you. I will try the preview again and try to change the Ubuntu StartingDirectory to an absolute host path like c:\ rather than the default.

Then I'll try $WSL again but am not hopeful. Not the end of the world to do this manually once inside the terminal window.

mintyc avatar Mar 23 '21 20:03 mintyc

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

ghost avatar Mar 27 '21 22:03 ghost

No satisfactory auto solution, but easy one liner to manually work around. If nothing else using the preview is highly recommended

mintyc avatar Mar 29 '21 23:03 mintyc