Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings doesn't open reliably when there's no association for .json files #1460

Closed
Mustafa5040 opened this issue Jun 23, 2019 · 15 comments
Closed
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@Mustafa5040
Copy link

When I press the settings on the Windows Terminal, it asks me how I want to open the .json file. So the settings won't open. Please help me

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 23, 2019
@Mustafa5040 Mustafa5040 changed the title Hata raporu in Windows Terminal, Settings not opening Help Me Jun 23, 2019
@Shorotshishir
Copy link

easy solution, u need a text editor. as simple as that. notepad++ or vs code will be perfect for it. your plain old notepad can do the trick too, but it is easier to edit in smarter text editors as it shows the .json in a formated way.

@hosser
Copy link

hosser commented Jun 23, 2019

Settings doesn't open for me either, but I don't get any kind of prompt. It just does nothing.

For what it's worth, I have Notepad++ installed.

Never mind, ignore me - I configured Notepad++ as the default file handler for JSON files (I didn't have one set) and now Settings opens that file correctly. So it's a simple filetype association issue.

@JushBJJ
Copy link

JushBJJ commented Jun 23, 2019

For settings, customise the terminal by editing the file "profiles.json" in
C:\Users\Your_Username\AppData\Local\Packages\Microsoft.WindowsTerminal_<some random characters>\RoamingState\profiles.json

@drk-mtr
Copy link

drk-mtr commented Jun 23, 2019

I was having the same issue - thanks for providing the solution.

Might be worth adding a prompt the first time someone attempts to use the Settings menu to advise them to check their file associations if it doesn't work? Or maybe as part of the install process if people don't want to clutter the program with these additional checks.

@hosser
Copy link

hosser commented Jun 23, 2019

I was having the same issue - thanks for providing the solution.

Might be worth adding a prompt the first time someone attempts to use the Settings menu to advise them to check their file associations if it doesn't work? Or maybe as part of the install process if people don't want to clutter the program with these additional checks.

Yeah - something needs to be done, as new users will have no idea the terminal is trying to open a .json file. I certainly didn't. So I had no reason to check the file handler for JSON files until I read others descriptions of what happens when they click Settings. Some kind of clue as to what the program is trying to do to enable basic troubleshooting would be nice.

@JushBJJ
Copy link

JushBJJ commented Jun 23, 2019

Agreed, I kinda suggest to automatically open notepad to edit profiles.json since its pre-installed in Windows systems and it would be uncommon for a normal user to uninstall it.

@mubeenpatel99
Copy link

You can Find the settings manually in the folder:

C:\Users\<YOUR_USERNAME>\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState

You can download these Icons and paste them in the same folder as profile.json for a better look:

icons and profile.zip

Snapshot:

Screenshot (42)

@drk-mtr
Copy link

drk-mtr commented Jun 23, 2019

@mubeenpatel99 are you able to share the settings.json that you configured in order to get ubuntu to run as a shell please?

I've tried manually pointing at ubuntu, ubuntu.exe and C:\Users\MyProfileName\AppData\Local\Microsoft\WindowsApps\ubuntu.exe instead of cmd.exe but no luck so far...

Edit: Please ignore - I've reinstalled and found it's "commandline" : "wsl.exe -d Ubuntu",

@Shorotshishir
Copy link

@drk-mtr please refer to this issue #1449
you will find the correct pattern for the WSL terminal command, for ubuntu it should look like this
commandline parameter : wsl.exe -d ubuntu-linux

@mubeenpatel99
Copy link

@mubeenpatel99 are you able to share the settings.json that you configured in order to get ubuntu to run as a shell please?

I've tried manually pointing at ubuntu, ubuntu.exe and C:\Users\MyProfileName\AppData\Local\Microsoft\WindowsApps\ubuntu.exe instead of cmd.exe but no luck so far...

Edit: Please ignore - I've reinstalled and found it's "commandline" : "wsl.exe -d Ubuntu",

Yeah great it's working now

@DHowett-MSFT DHowett-MSFT changed the title in Windows Terminal, Settings not opening Help Me Settings doesn't open reliably when there's no association for .json files Jun 24, 2019
@DHowett-MSFT
Copy link
Contributor

Re-titled to make this a little more robust.

@DHowett-MSFT DHowett-MSFT added Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 27, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 27, 2019
@DHowett-MSFT DHowett-MSFT added the Help Wanted We encourage anyone to jump in on these. label Jun 27, 2019
@levicki
Copy link

levicki commented Jul 2, 2019

If you change startingDirectory value you must use either forward slashes (/) or escaped backslashes (\\) in the filesystem path or the Terminal will refuse to reload settings due to invalid Json format.

To a front-end developer this might be obvious, but not for regular users.

@HAWK-Soft
Copy link

@mubeenpatel99 are you able to share the settings.json that you configured in order to get ubuntu to run as a shell please?
I've tried manually pointing at ubuntu, ubuntu.exe and C:\Users\MyProfileName\AppData\Local\Microsoft\WindowsApps\ubuntu.exe instead of cmd.exe but no luck so far...
Edit: Please ignore - I've reinstalled and found it's "commandline" : "wsl.exe -d Ubuntu",

Yeah great it's working now

I think these links are useful before complete this config file (profiles.json). Thanks for your help guys! (:

https://docs.microsoft.com/en-gb/windows/wsl/install-win10
https://docs.microsoft.com/en-gb/windows/wsl/about

@metathinker
Copy link
Contributor

I believe #1841 fixes this issue (no .json file editor registered prevents profiles.json from opening).

@DHowett-MSFT
Copy link
Contributor

Hey, good catch! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests

10 participants