windows:windows_terminal

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
windows:windows_terminal [2020/05/29 02:32] – [settings.json の設定例] ともやんwindows:windows_terminal [2020/09/19 10:22] – [設定] ともやん
行 1: 行 1:
-<html> 
-  <style> 
-    #result pre, #mincode pre { 
-      overflow: hidden; 
-      font-size: 10px; 
-    } 
-    #result_long pre { 
-      height: 250px; 
-      overflow: scroll; 
-      overflow-x: hidden; 
-      font-size: 10px; 
-    } 
-    #mintbl table { 
-      font-size: 12px; 
-    } 
-    #mintbl td pre { 
-      margin: 0; 
-    } 
-    .dokuwiki .plugin_wrap table { 
-      width: auto; 
-    } 
-    #logo { 
-      background-color: white; 
-      padding: 10px; 
-      width: fit-content; 
-    } 
-    #logo p { 
-      margin: 0; 
-    } 
-  </style> 
-</html> 
 ====== Windows Terminal ====== ====== Windows Terminal ======
 Windows Terminal は Windows 10 向けの新しいコマンドプロンプトを提供する。Linux ターミナルのようにマルチタブなどの機能も提供されている。\\ Windows Terminal は Windows 10 向けの新しいコマンドプロンプトを提供する。Linux ターミナルのようにマルチタブなどの機能も提供されている。\\
行 38: 行 7:
 ソースコード: [[https://github.com/microsoft/terminal|GitHub - microsoft/terminal: The new Windows Terminal, and the original Windows console host -- all in the same place!]]\\ ソースコード: [[https://github.com/microsoft/terminal|GitHub - microsoft/terminal: The new Windows Terminal, and the original Windows console host -- all in the same place!]]\\
 \\ \\
-{{:windows:windows_terminal.png?470|Windows Terminal}}\\+{{windows:windows_terminal.png?470|Windows Terminal}}\\
  
 ===== システム必要条件 ===== ===== システム必要条件 =====
行 52: 行 21:
 </WRAP> </WRAP>
 OS バージョンを更新しないとインストールできないようである。\\ OS バージョンを更新しないとインストールできないようである。\\
-{{:windows:windows_terminal_os_spec.png?800|Microsofe Store}}\\+{{windows:windows_terminal_os_spec.png?800|Microsofe Store}}\\
  
 ===== インストール ===== ===== インストール =====
行 94: 行 63:
 ===== 設定 ===== ===== 設定 =====
 Windows Terminal の設定はタブのドロップダウンから **Settings** を選択して **json ファイル**を編集する。\\ Windows Terminal の設定はタブのドロップダウンから **Settings** を選択して **json ファイル**を編集する。\\
-{{:windows:windows_terminal_settings.png?284|Windows Terminal Settings}}\\+<WRAP prewrap 100%> 
 +ファイルパス: <html><code>%USERPROFILE%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json</code> 
 +</html> 
 +</WRAP> 
 +{{windows:windows_terminal_settings.png?284|Windows Terminal Settings}}\\
  
 ==== settings.json のセクション構成 ==== ==== settings.json のセクション構成 ====
行 168: 行 141:
                 "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",                 "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                 "hidden": false,                 "hidden": false,
-                "name": "PowerShell v7.0",+                "name": "PowerShell Core",
                 //"source": "Windows.Terminal.PowershellCore",                 //"source": "Windows.Terminal.PowershellCore",
-                "commandline": "pwsh.exe",+                "commandline": "%USERPROFILE%\\scoop\\apps\\powershell\\current\\pwsh.exe", 
 +                "icon": "%USERPROFILE%\\scoop\\apps\\powershell\\current\\assets\\Powershell_av_colors.ico",
                 "colorScheme": "Campbell",                 "colorScheme": "Campbell",
                 "startingDirectory" : "%USERPROFILE%"                 "startingDirectory" : "%USERPROFILE%"
行 246: 行 220:
 </WRAP> </WRAP>
 ※**backgroundImage** は 400 x 300px の png 画像を使用。\\ ※**backgroundImage** は 400 x 300px の png 画像を使用。\\
 +
 +==== WSL の レジストリ設定を一覧表示する ====
 +**Get-ChildItem** コマンドレットでレジストリを調べる。\\
 +<WRAP prewrap 100%>
 +<code powershell>
 +$ Get-ChildItem -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result>
 +<code powershell>
 +
 +    Hive: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
 +
 +Name                           Property
 +----                           --------
 +{874A2A70-6EAF-42C1-A6F6-1C2EA DistributionName   : FedoraRemix
 +C2BFA52}                       BasePath           : C:\wsl\FedoraRemix
 +                               State              : 1
 +                               Version            : 2
 +                               DefaultEnvironment : {HOSTTYPE=x86_64, LANG=en_US.UTF-8, PATH=/usr/local/sbin:/usr/loc
 +                               al/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, TERM=xterm-256color}
 +                               DefaultUid         : 1000
 +                               KernelCommandLine  : BOOT_IMAGE=/kernel init=/init ro
 +                               Flags              : 15
 +{CC54D096-DBCD-4D93-93A5-899AE DistributionName   : Fedora-WSL1
 +35559B4}                       BasePath           : C:\wsl\Fedora-WSL1
 +                               State              : 1
 +                               Version            : 2
 +                               DefaultEnvironment : {HOSTTYPE=x86_64, LANG=en_US.UTF-8, PATH=/usr/local/sbin:/usr/loc
 +                               al/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, TERM=xterm-256color}
 +                               DefaultUid         : 0
 +                               KernelCommandLine  : BOOT_IMAGE=/kernel init=/init ro
 +                               Flags              : 7
 +{E74B61AB-F675-4518-A0E3-BCEE9 DistributionName   : Fedora
 +C7F8E9C}                       BasePath           : C:\wsl\Fedora
 +                               State              : 1
 +                               Version            : 2
 +                               DefaultEnvironment : {HOSTTYPE=x86_64, LANG=en_US.UTF-8, PATH=/usr/local/sbin:/usr/loc
 +                               al/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, TERM=xterm-256color}
 +                               DefaultUid         : 1000
 +                               KernelCommandLine  : BOOT_IMAGE=/kernel init=/init ro
 +                               Flags              : 15
 +{F9260EF7-5866-4DAC-8E4F-86487 DistributionName   : Fedora32
 +1004DA4}                       BasePath           : C:\wsl\Fedora32
 +                               State              : 1
 +                               Version            : 2
 +                               DefaultEnvironment : {HOSTTYPE=x86_64, LANG=en_US.UTF-8, PATH=/usr/local/sbin:/usr/loc
 +                               al/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, TERM=xterm-256color}
 +                               DefaultUid         : 0
 +                               KernelCommandLine  : BOOT_IMAGE=/kernel init=/init ro
 +                               Flags              : 15
 +</code>
 +</WRAP>
  
 ==== MSYS2 MinGW 64-bit を追加する ==== ==== MSYS2 MinGW 64-bit を追加する ====
行 364: 行 391:
  
 ===== トラブルシューティング ===== ===== トラブルシューティング =====
 +
 +==== 長時間実行プロセスを Ctrl + C で終了すると PowerShell が終了する ====
 +<WRAP prewrap 100% #result>
 +<code powershell>
 +PowerShell 7.0.2
 +Copyright (c) Microsoft Corporation. All rights reserved.
 +
 +https://aka.ms/powershell
 +Type 'help' to get help.
 +
 +PS C:\Users\nakayama> cd d:\wsl
 +PS D:\wsl> xz .\fedora.tar
 +
 +[プロセスはコード 3221225786 で終了しました]
 +</code>
 +</WRAP>
 +英語では以下のようにシェルが終了する。\\
 +<WRAP prewrap 100% #result>
 +<code powershell>
 +[process exited with code 3221225786]
 +</code>
 +</WRAP>
 +
 +設定 (settings.json) の **"source"** コメントアウトして、以下のように **"commandline"** にフルパス記述するように修正する。\\
 +<WRAP prewrap 100% #result>
 +<code javascript settings.json>
 +        "list":
 +        [
 +            {
 +                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
 +                "hidden": false,
 +                "name": "PowerShell Core",
 +                //"source": "Windows.Terminal.PowershellCore",
 +                "commandline": "%USERPROFILE%\\scoop\\apps\\powershell\\current\\pwsh.exe",
 +                "icon": "%USERPROFILE%\\scoop\\apps\\powershell\\current\\assets\\Powershell_av_colors.ico",
 +                "colorScheme": "Campbell",
 +                "startingDirectory" : "%USERPROFILE%"
 +            }
 +        ]
 +</code>
 +</WRAP>
 +
 +[[https://github.com/PowerShell/PowerShell/issues/11314|pwsh as a dotnet global tool exhibits very unusual behavior with Ctrl-C · Issue #11314 · PowerShell/PowerShell · GitHub]]\\
  
 ==== バージョンアップ後にユーザー設定読み込みエラーが発生する ==== ==== バージョンアップ後にユーザー設定読み込みエラーが発生する ====
行 379: 行 449:
 </code> </code>
 </WRAP> </WRAP>
-{{:windows:windows_terminal_settings_error_001.png?400|"globals" プロパティは廃止}}\\+{{windows:windows_terminal_settings_error_001.png?400|"globals" プロパティは廃止}}\\
  
 以下のような "globals" プロパティの場合\\ 以下のような "globals" プロパティの場合\\
  • windows/windows_terminal.txt
  • 最終更新: 2023/09/20 18:15
  • by ともやん