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

Closed
opened 2026-01-30 22:43:02 +00:00 by claunia · 15 comments
Owner

Originally created by @Mustafa5040 on GitHub (Jun 23, 2019).

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

Originally created by @Mustafa5040 on GitHub (Jun 23, 2019). 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
Author
Owner

@Shorotshishir commented on GitHub (Jun 23, 2019):

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.

@Shorotshishir commented on GitHub (Jun 23, 2019): 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.
Author
Owner

@hosser commented on GitHub (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.

@hosser commented on GitHub (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.
Author
Owner

@JushBJJ commented on GitHub (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

@JushBJJ commented on GitHub (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`
Author
Owner

@drk-mtr commented on GitHub (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.

@drk-mtr commented on GitHub (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.
Author
Owner

@hosser commented on GitHub (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.

@hosser commented on GitHub (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.
Author
Owner

@JushBJJ commented on GitHub (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.

@JushBJJ commented on GitHub (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.
Author
Owner

@mubeenpatel99 commented on GitHub (Jun 23, 2019):

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)

@mubeenpatel99 commented on GitHub (Jun 23, 2019): ### 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](https://github.com/microsoft/terminal/files/3318060/icons.and.profile.zip) ### Snapshot: ![Screenshot (42)](https://user-images.githubusercontent.com/42268754/59979063-4ac37280-9600-11e9-9834-02a10bbb040a.png)
Author
Owner

@drk-mtr commented on GitHub (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",

@drk-mtr commented on GitHub (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",`
Author
Owner

@Shorotshishir commented on GitHub (Jun 23, 2019):

@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

@Shorotshishir commented on GitHub (Jun 23, 2019): @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`
Author
Owner

@mubeenpatel99 commented on GitHub (Jun 24, 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",

Yeah great it's working now

@mubeenpatel99 commented on GitHub (Jun 24, 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",` Yeah great it's working now
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 24, 2019):

Re-titled to make this a little more robust.

@DHowett-MSFT commented on GitHub (Jun 24, 2019): Re-titled to make this a little more robust.
Author
Owner

@levicki commented on GitHub (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.

@levicki commented on GitHub (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.
Author
Owner

@HAWK-Soft commented on GitHub (Jul 4, 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",

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

@HAWK-Soft commented on GitHub (Jul 4, 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",` > > 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](url) [https://docs.microsoft.com/en-gb/windows/wsl/about](url)
Author
Owner

@metathinker commented on GitHub (Jul 10, 2019):

I believe https://github.com/microsoft/terminal/pull/1841 fixes this issue (no .json file editor registered prevents profiles.json from opening).

@metathinker commented on GitHub (Jul 10, 2019): I believe https://github.com/microsoft/terminal/pull/1841 fixes this issue (no .json file editor registered prevents profiles.json from opening).
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 10, 2019):

Hey, good catch! Thanks.

@DHowett-MSFT commented on GitHub (Jul 10, 2019): Hey, good catch! Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1968