質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
WSL(Windows Subsystem for Linux)

WSL (Windows Subsystem for Linux) は、Windows10のOS上でLinux向けのバイナリプログラムを実行可能にする機能です。また、WindowsOSのAPIを用いた仕組みを提供しており、Linux側からWindowsOSへのファイルアクセスもできます。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Q&A

解決済

1回答

3338閲覧

Windows Terminalを起動すると、エラーメッセージが出ます。また、Ubuntu 18.04 LTSを既定にしたいです。

退会済みユーザー

退会済みユーザー

総合スコア0

WSL(Windows Subsystem for Linux)

WSL (Windows Subsystem for Linux) は、Windows10のOS上でLinux向けのバイナリプログラムを実行可能にする機能です。また、WindowsOSのAPIを用いた仕組みを提供しており、Linux側からWindowsOSへのファイルアクセスもできます。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

0グッド

0クリップ

投稿2020/06/27 12:37

こんばんは。お世話になります。

現象

Windows Terminalを起動すると

「設定を読み込めませんでした 

ファイルから設定を読み込むことができませんでした。末尾のコンマを含めて構文エラーを確認してください。

  • Line 67, Column 14
    Missing '}' or object member name

Windows ターミナルの既定の設定を一時的に使用しています。」

というメッセージが出ます。

期待値

エラーメッセージが出ない状態で、Windows Terminalを起動した際にUbuntu 18.04 LTSを既定で最初に起動させる。

再現手順

setting.jsonを下記のような記述にする。

json

1// This file was initially generated by Windows Terminal 1.0.1401.0 2// It should still be usable in newer versions, but newer versions might have additional 3// settings, help text, or changes that you will not see unless you clear this file 4// and let us generate a new one for you. 5 6// To view the default settings, hold "alt" while clicking on the "Settings" button. 7// For documentation on these settings, see: https://aka.ms/terminal-documentation 8{ 9 "$schema": "https://aka.ms/terminal-profiles-schema", 10 11 "defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", 12 13 // You can add more global application settings here. 14 // To learn more about global settings, visit https://aka.ms/terminal-global-settings 15 16 // If enabled, selections are automatically copied to your clipboard. 17 "copyOnSelect": false, 18 19 // If enabled, formatted data is also copied to your clipboard 20 "copyFormatting": false, 21 22 // A profile specifies a command to execute paired with information about how it should look and feel. 23 // Each one of them will appear in the 'New Tab' dropdown, 24 // and can be invoked from the commandline with `wt.exe -p xxx` 25 // To learn more about profiles, visit https://aka.ms/terminal-profile-settings 26 "profiles": 27 { 28 "defaults": 29 { 30 // Put settings here that you want to apply to all profiles. 31 }, 32 "list": 33 [ 34 { 35 // Make changes here to the powershell.exe profile. 36 "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", 37 "name": "Windows PowerShell", 38 "commandline": "powershell.exe", 39 "hidden": false 40 }, 41 { 42 // Make changes here to the cmd.exe profile. 43 "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", 44 "name": "コマンド プロンプト", 45 "commandline": "cmd.exe", 46 "hidden": true 47 }, 48 { 49 "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", 50 "hidden": false, 51 "name": "Azure Cloud Shell", 52 "source": "Windows.Terminal.Azure", 53 "hidden": true 54 }, 55 { 56 "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", 57 "hidden": false, 58 "name": "Ubuntu-18.04", 59 "source": "Windows.Terminal.Wsl", 60 "commandline": "wsl.exe ~ -d Ubuntu-18.04" 61 } 62 ] 63 } 64 65 // Add custom color schemes to this array. 66 // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes 67 "schemes": [], 68 69 // Add custom keybindings to this array. 70 // To unbind a key combination from your defaults.json, set the command to "unbound". 71 // To learn more about keybindings, visit https://aka.ms/terminal-keybindings 72 "keybindings": 73 [ 74 // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. 75 // These two lines additionally bind them to Ctrl+C and Ctrl+V. 76 // To learn more about selection, visit https://aka.ms/terminal-selection 77 { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" }, 78 { "command": "paste", "keys": "ctrl+v" }, 79 80 // Press Ctrl+Shift+F to open the search box 81 { "command": "find", "keys": "ctrl+shift+f" }, 82 83 // Press Alt+Shift+D to open a new pane. 84 // - "split": "auto" makes this pane open in the direction that provides the most surface area. 85 // - "splitMode": "duplicate" makes the new pane use the focused pane's profile. 86 // To learn more about panes, visit https://aka.ms/terminal-panes 87 { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } 88 ] 89}

よろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

まず、エラーの修正から。,が一箇所抜けています(63行目)。

JSON

1 ] 2 }, 3 4 // Add custom color schemes to this array. 5 // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes

エラーが表示されなくなったら、Ubuntuのエントリーに表示されているGUIDを11行目の"defaultProfile"に設定……すでに設定されていますね。ですから、エラーの修正だけで目的は達成できるかと思います。

投稿2020/06/27 13:04

Daregada

総合スコア11990

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2020/06/27 14:37

できました! ありがとうございました<(_ _)>
Daregada

2020/06/27 14:41

おつかれさま。
退会済みユーザー

退会済みユーザー

2020/06/27 14:46

おつありです!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問