登録日: 2023-03-19 更新日: 2023-04-01
こちらの「Linux あれこれ」は「Linux」メインで投稿してますが、「Windows11」で「Linux」を使う機能に興味があり、投稿しました。
-
前回 、「Windows11」(22H2) で「PowerShell」について学んだので、「WSL2」で「Linux」(Ubuntu) をインストールしてみました。
「WSL2」のインストールは、「Windows10」よりも「Windows11」の方が、コマンドひとつで行えるので簡単です。
-
また、「WSL2」でインストールするときのデフォルトは「Ubuntu」です。安定版で最新の「Ubuntu 22.04.2 LTS」がインストールされました。
-
普通の Linux ディストリビューションと違い、「Ubuntu」のデスクトップ環境はインストールされませんが、「Windows」メニューから、「Windows」アプリと同じように、「Linux」のGUI アプリが起動でき、「Windows」上のウィンドウでLinux の GUI アプリが使えます。
また、Linux 上に「Windows」のファイルシステムが自動マウントされます。
使い方によっては便利です。 その備忘録です。
-
-
使用したPC は、USB 3.0 ポートのある「Windows 11」のノートPC です。メモリ 12GB、SSD 1TB に増設しています。 「UEFI 立ち上げ」のPC です。
-
(注)リンクを戻るときはブラウザの左上の「←」をクリック
-
-
目次
-
前回の作業:
「Windows11」(22H2) と「Ubuntu」で、「PowerShell」を使う〈H165-2〉:
-
今回の作業:
3. 「Ubuntu」に、日本語フォント「fonts-noto-cjk」をインストール: ☆
5. 「Ubuntu」に、よく使うアプリをインストール:
(1). ブラウザ「ESR 版 firefox」:
(3). ファイルマネージャ「nautilus」:
(4). テキストエディタ「gedit」:
-
7. 「fcitx-mozc」で日本語入力できるように設定: ☆
8. 「fcitx-mozc」で日本語入力のキー割当を別々のキーに変更: ☆
-
9. 「Windows11」と「WSL2」でデータ共有する工夫:
10. 「WSL2」で「クリップボードの共有」機能を有効化: ☆
11. 「Windows11」の日本語のフォルダ名を英語に変更: ☆
-
参考:
1. 「Windows PowerShell 5.1」について:
2. 管理者権限で「Windows PowerShell 5.1」を起動:
-
10. 「Ubuntu」のその他の操作:
(1). 指定した「Linux」の停止:
(2). 「すべての「Linux」の停止:
(3). コマンドで管理者権限の「PowerShell」を起動:
(4). 「Windows11」の再起動:
(5). 「Windows11」の電源オフ:
-
11. 「Windows11」側に、フォントをインストールする場合:
12. 「Windows 11」側のフォントを「Ubuntu」で使えるように設定:
-
13. 「Linux」アプリが固まった場合の対応: ★
-
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - -
「Windows11」(22H2) を起動:
-
立ち上げた「Windows11」の画面:
「Windows10」から「Windows11」にアップグレードしたので、デスクトップに以前使っていたアプリのアイコン(ショートカット)と「壁紙」が残っています。
-
「Windows PowerShell 5.1」を起動:
→「Windows11」の標準のシェルです。
デスクトップの空きで右クリック →「ターミナルを開く」、
もしくは、パネルの「Windows」ボタンを右クリック→「ターミナル」で起動できます。
個人的には、タスクバーにもピン留めしてます。
-
「Windows ターミナル」の「v」タブにて「Ubuntu」を起動できます:
→表示された一覧から「Ubuntu」を選択するか、Ctrl+Shift+5 にて、下記のように「Ubuntu」タブを起動できます。
-
「Windows ターミナル」にて「Ubuntu 22.04.2 LTS」を起動:
→背景が紫色(Ubuntu の色)なので「Ubuntu」を使っていることがわかりやすいです。
別にこちらの紫色の画面でないと「Ubuntu」が使えないわけではありません。外観の設定がされているだけです。
-
GUI のデスクトップ環境がないので、こちらのターミナル画面がメインになります。
このターミナル画面からコマンドを投入して、アプリを起動できます。
-
ちなみに、「Windows」メニューからもアプリの起動ができます。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - --
「Ubuntu」について:
-
「Debian GNU/Linux」の開発版を元にした Linux ディストリビューション(OS)です
参考:
-
Ubuntu(ウブントゥ)は「Debian GNU/Linux」(デビアン)の開発版である「sid」(不安定版)を元にした Linux ディストリビューション(OS + アプリ群)で、標準のデスクトップ環境は「GNOME」です。
Debian と同じ、パッケージ管理システムは「APT」で、パッケージのファイル形式は「deb」です。
すべての管理者権限を持つ「root」でのログインは標準では無効で、その代わりに「sudo」を使います。
Debian は「オールフリーのOS の実現」が目的ですが、Ubuntu では使いやすさ優先で、Debian と違い、プロプライエタリな(利用制限がある)ドライバやソフトウェアを含んでいます。なので「Debian」と共有ライブラリも違うので「リポジトリ」は別だし、「バイナリ互換性」も保証されていません。
-
「Canonical」(カノニカル)社、つまり、「Launchpad 」サイトでメンテされています。
-
個人的には、 Ubuntu のフレーバー(兄弟?)で「Xfce」デスクトップ環境にした「Xubuntu」をメインで使っています。
-
「Ubuntu 22.04」の現在のバージョンを表示:
2023-03-19 現在
カーネル:
$ uname -r 5.15.90.1-microsoft-standard-WSL2
-
リリース:
$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
→2023-03 に、「22.04.2」にアップしました。
-
$ cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.2 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.2 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy
-
「Ubuntu 22.04.2 LTS」が、「x11」と「Wayland」のどちらで動作しているか、の確認:
$ echo $XDG_SESSION_TYPE $
→デスクトップ環境がインストールされていないので「表示なし」です。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ---
「WSL 2」について:
-
参考:
-
1). 「WSL 2」は、Windows で Linux バイナリを実行できるようにする環境:
「Linux 用 Windows サブシステム」(WSL) の新版 (WSL 2) です。
「WSL 2」は、ハイパーバイザー「Hyper-V」上の「仮想環境」で Linux カーネルが動くので、 ほぼ「Linux」です。
また、ファイル システムは ntfs から ext4 に変更され、Linux でのファイルシステムのパフォーマンスが向上しています。
-
2). WSL2 を動かす要件:
-
(1).「Windows 10」で、最新ビルドであるか確認:
Windows + R を押して、「winver」Enter
→「ビルド 20262」以降が必要
表示例:
Microsoft Windows バージョン 22H2 (OS ビルド 22621.1344)
-
(2).「Windows 10」で、仮想化機能が有効か確認:
「Windows」ボタンを右クリック→「ターミナル」
もしくは、Windows + R を押して、「powershell」Enter
PS C:\Users\user> systeminfo : Hyper-V の要件: VM モニター モード拡張機能: はい ファームウェアで仮想化が有効になっています: はい 第 2 レベルのアドレス変換: はい データ実行防止が使用できます: はい
→一番下に表示される「Hyper-Vの要件」にて、
4つの項目が「はい」であれば、仮想化機能は有効です
-
(3). 仮想化機能が無効のときの対応例:
「System Configuration」項目一覧から「Virtualization Technology」を選択
Enter キーを押し、「Enabled」を選択
「Exit」→「Exit Saving Changes」→「Yes」
「Windows 10」を再起動
-
3). 「Windows11」の「WSL 2」は、更新のたびに「使いやすさ」が進化:
-
(1).「Windows11」では、ひとつの「wsl」コマンドだけで、「WSL2」をインストールできるようになりました。
→「Linux 用 Windows サブシステム」の有効化などの手順は自動で行われます。
-
(2).「Linux GUI アプリ」は、Windows メニューで、普通のアプリのように起動できます。
-
(3).「Linux GUI アプリ」の起動で、「Windows」のデスクトップ画面で、ひとつのアプリのウィンドウとして表示されます。
→Linux デスクトップ画面が不要なので、X Window System を使えるようにする手間が要りません。
-
4). 利用できる「Linux ディストリビューション」は「オンライン ストア」に登録されています。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----
1.「WSL 2」で「Ubuntu」をインストール:
-
1). 「Windows11」で、管理者権限で「PowerShell」を起動:
「Windows」ボタンを右クリック →「ターミナル(管理者)」
→「はい」
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. 新機能と改善のために最新の PowerShell をインストールしてください!https://aka.ms/PSWindows PS C:\Users\user>
→ターミナルの「管理者: Windows PowerShell」タブで表示
-
管理者権限の「ターミナル」であるか確認するには:
PS C:\Users\user> get-tpm
→「 get-tpm」は「管理者権限」でないと動かないので、
表示されれば「管理者権限」です。
-
2). インストールできる「Linux ディストリビューション」の一覧を表示:
2023-03-18 現在:
PS C:\Users\user> wsl --list --online : インストールできる有効なディストリビューションの一覧を次に示します。 'wsl.exe --install <Distro>' を使用してインストールします。 NAME FRIENDLY NAME Ubuntu Ubuntu Debian Debian GNU/Linux kali-linux Kali Linux Rolling Ubuntu-18.04 Ubuntu 18.04 LTS Ubuntu-20.04 Ubuntu 20.04 LTS Ubuntu-22.04 Ubuntu 22.04 LTS OracleLinux_8_5 Oracle Linux 8.5 OracleLinux_7_9 Oracle Linux 7.9 SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4 openSUSE-Leap-15.4 openSUSE Leap 15.4 openSUSE-Tumbleweed openSUSE Tumbleweed
-
Fedora 系が欲しければ、「OracleLinux」が RHEL 互換、つまり CentOS 互換です。
デスクトップ環境は含まれていません。自動ログインされ「ターミナル」が開きます。 つまり、サーバー版に近い?イメージです。
-
3). 「Windows11」で、WSL2 をインストール:
インストールする「Linux ディストリビューション」は「-d」オプションで指定します。
-
(1). 「Linux ディストリビューション」の指定をしない場合: ★
PS C:\Users\user> wsl --install
→「Ubuntu」の最新版がインストールされます:
現在、インストールされるのは「Ubuntu 22.04.2 LTS」です。
ちなみに、「-」は 2つ必要です。
-
(2). 「Linux ディストリビューション」を指定する場合:
PS C:\Users\user> wsl --install -d Ubuntu-22.04
→「-d」オプションで指定します。
-
ちなみに、上記の「項番 (1).」と「項番 (2).」でインストールされる「Linux ディストリビューション」は同じでも、インストール先のフォルダは別です。つまり、管理上は 別の OS として、一緒にインストールできます。
-
4). 参考: インストール中の表示:
インストール中: 仮想マシン プラットフォーム 仮想マシン プラットフォーム はインストールされました。 インストール中: Linux 用 Windows サブシステム Linux 用 Windows サブシステム はインストールされました。 インストール中: Ubuntu Ubuntu はインストールされました。 要求された操作は正常に終了しました。変更を有効にするには、システムを再起動する必要があります。
-
5). ターミナルを右上の「x」で閉じました。
-
6). 指示に従い、「Windows11」を再起動:
-
7). 自動的に「ターミナル」が立ち上がり、「Ubuntu」タブが開きました:
Ubuntu は既にインストールされています。 Ubuntu を開始しています... Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username:
和訳:
デフォルトの UNIX ユーザ アカウントを作成してください。
ユーザ名は、Windows ユーザ名と一致する必要はありません。
-
8). ユーザ名/パスワードを設定:
Enter new UNIX username: ubn ←「ユーザ名」を入力 New password: ←「パスワード」を入力 Retype new password: ←再入力 passwd: password updated successfully Installation successful! To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage This message is shown once a day. To disable it please create the /home/ubn/.hushlogin file.
→このメッセージは 1 日 1 回表示されます。
-
確認:
PS C:\Users\user> ls /home/ubn/.hushlogin : ls : パス 'C:\home\ubn\.hushlogin' が存在しないため検出できません。 発生場所 行:1 文字:1 + ls /home/ubn/.hushlogin + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\home\ubn\.hushlogin:String) [Get-ChildItem], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
→ファイルがありません。
-
参考: 「~/.hushlogin」ファイルがない場合は、
telnet や SSH でログインした場合に、システムメッセージ(最終ログイン日時)が表示されます。
ここでは、起動時のメッセージが 1 日 1 回表示されます。
-
下記のように「~/.hushlogin」ファイルを作成すると、表示されません:
$ touch ~/.hushlogin
-
9). コンピュータ名が自動的にシステムの情報を使って設定されました。
ターミナルのタブ名が「Ubuntu」タブから「ubn@FMVpc:~」タブに変わり、
同じようにターミナルの「プロンプト」も変わりました:
ubn@FMVpc:~$
→プロンプト表示について:
「ubn」は、ユーザ名
「FMVpc」は、コンピュータ名(ホスト名)
「~」は、作業ディレクトリ名。「~」はホームディレクトリのこと
「$」は、 bash シェルで、管理者権限ではありません
を示します。
-
10). 「Ubuntu」が利用可能になりました:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - -----
2. 参考:「Windows ターミナル」の起動のやり方:
-
「Windows ターミナル」の起動のやり方はいくつかあります。
-
1). 「Windows」ボタンを右クリック →「ターミナル」
→「ターミナル」が起動:
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. 新機能と改善のために最新の PowerShell をインストールしてください!https://aka.ms/PSWindows PS C:\Users\user>
-
2). 「Windows + R」→「powershell」Enter
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. 新機能と改善のために最新の PowerShell をインストールしてください!https://aka.ms/PSWindows PS C:\Users\user>
-
もし、「PowerShell 7」をインストールしている場合は、
「Windows + R」→「pwsh」Enter
-
→「ターミナル」が起動:
PowerShell 7.3.3 PS C:\Users\user>
→「C:\Program Files\PowerShell」タブで開きました
-
3). 「Windows」キー →「term」で検索 →「ターミナル」をクリック
→「ターミナル」が起動:
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. 新機能と改善のために最新の PowerShell をインストールしてください!https://aka.ms/PSWindows PS C:\Users\user>
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- -
3. 参考:「Ubuntu」の起動のやり方:
-
「Ubuntu」の起動のやり方はいくつかあります。
-
1). 「Windows」キーで検索して、「Ubuntu」を起動するやり方:
-
「Windows」キー →「u」で検索 →「Ubuntu」をクリック
「Ubuntu」が起動:
ubn@FMVpc:~$
→ターミナルの背景が黒色の「ubn@FMVpc:~」タブが表示:
-
「Ubuntu」が起動していることがわかりづらいので、確認:
ubn@FMVpc:~$ uname -r 5.15.90.1-microsoft-standard-WSL2
-
2). 「Windows ターミナル」の「タブ」(プロファイル)を使い、「Ubuntu」を起動するやり方:
Ubuntu のユーザアカウントの作成で、「ターミナル」のプロファイルが追加され、「Ubuntu」の項目が表示されます。
-
(1). 「Windows」ボタンを右クリック →「ターミナル」
-
(2). 「+」タブの隣の、タブバーの「v」ボタンを押し「Ubuntu」を選択:
ubn@FMVpc:~$
→「Ubuntu」タブが表示され、ターミナルの背景が紫色の「Ubuntu」が起動:
-
(3). もしくは、「Ctrl+Shift+5」でも起動:
ubn@FMVpc:~$
→「Ubuntu」タブが表示され、ターミナルの背景が紫色の「Ubuntu」が起動:
-
この画面の利点は、背景が紫色なので、そのターミナル画面が「Ubuntu」で使っていることがわかりやすいこと。
-
3). 「Windows ターミナル」から、コマンドで「Ubuntu」を起動するやり方:
-
(1). 「Windows」ボタンを右クリック →「ターミナル」
-
(2). コマンド入力:
PS C:\Users\user> wsl
ubn@FMVpc:/mnt/c/Users/user$
→指定なしで「wsl」を起動すると「Ubuntu」が起動します。
-
もし、「ユーザ」を指定して「wsl」を起動する場合:
PS C:\Users\user> wsl -u ubn
→複数のユーザを作成していた場合の指定です。ホームフォルダ名が変わります。
-
もし、「Linux ディストリビューション」を指定して「wsl」を起動する場合:
複数の「Linux ディストリビューション」をインストールしていた場合:
PS C:\Users\user> wsl --list -v NAME STATE VERSION * Ubuntu Stopped 2 Ubuntu-22.04 Stopped 2
→「Ubuntu-22.04」がインストールされている場合です。
-
「Linux ディストリビューション」を指定して「wsl」を起動:
PS C:\Users\user> wsl -d Ubuntu-22.04
ubn@FMVpc:/mnt/c/Users/user$
→「Ubuntu」が起動:
「ターミナル」のタブ名と、プロンプトが変わりました。
-
4). 「Windows ターミナル」の別の「タブ」画面にて、コマンドで「Ubuntu」を起動するやり方:
「PowerShell」と「Ubuntu」を起動したタブを分けて使いたい場合:
-
(1). 「Windows」ボタンを右クリック →「ターミナル」
-
(2). 「+」タブ→新しい「PowerShell」を開きます:
-
(3). コマンド入力:
PS C:\Users\user> wsl
ubn@FMVpc:/mnt/c/Users/user$
→指定なしで「wsl」を起動すると「Ubuntu」が起動します。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- --
4. 参考:「Ubuntu」を起動したときの情報について:
-
1). 「Ubuntu」の起動にて:
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage This message is shown once a day. To disable it please create the /home/ubn/.hushlogin file.
-
表示されるプロンプトは、起動のやり方で変わります:
ubn@FMVpc:~$
もしくは、
ubn@FMVpc:/mnt/c/Users/user$
→Ubuntu の「/mnt/c/」に、Windows のファイルシステム「C:\Users\user\」がマウントされています:
-
下の表示でなくても、マウントは行われています。
-
2). 情報を確認:
ubn@FMVpc:~$ uname -r 5.15.90.1-microsoft-standard-WSL2
ubn@FMVpc:~$ cd /mnt/c/ ubn@FMVpc:/mnt/c$
-
ubn@FMVpc:/mnt/c$ ls : ls: cannot access 'DumpStack.log.tmp': Permission denied ls: cannot access 'hiberfil.sys': Permission denied ls: cannot access 'pagefile.sys': Permission denied ls: cannot access 'swapfile.sys': Permission denied '$Recycle.Bin' 'Program Files (x86)' '$WINRE_BACKUP_PARTITION.MARKER' ProgramData '$WinREAgent' Recovery AMTAG.BIN Squeak 'Documents and Settings' 'System Volume Inform ation' DumpStack.log.tmp Users Intel Windows 'My Squeak' hiberfil.sys PerfLogs pagefile.sys 'Program Files' swapfile.sys
→すべて表示するには管理者権限が必要です。
-
Ubuntu 側から、「Windows11」のファイルシステムを確認:
ubn@FMVpc:/mnt/c$ sudo ls : '$Recycle.Bin' 'My Squeak' 'System Volume Information' '$WINRE_BACKUP_PARTITION.MARKER' PerfLogs Users '$WinREAgent' 'Program Files' Windows AMTAG.BIN 'Program Files (x86)' hiberfil.sys 'Documents and Settings' ProgramData pagefile.sys DumpStack.log.tmp Recovery swapfile.sys Intel Squeak
↓ よく見るフォルダを抜粋:
'Documents and Settings' 'Program Files' 'Program Files (x86)' Users Windows
→たぶん、「ntfs」です。
-
別の「PowerShell」タブで、「Windows11」側から「Ubuntu」の状態を確認:
PS C:\Users\user> wsl --list -v : NAME STATE VERSION * Ubuntu Running 2
→「2」は「WSL 2 」で作成されたことを示します。表示されるということは「WSL」の場合もあるということ。
-
各バージョンを表示:
PS C:\Users\user> wsl -v : WSL バージョン: 1.1.3.0 ←(WSL 2) カーネル バージョン: 5.15.90.1 ←(Linux カーネル) WSLg バージョン: 1.0.49 ←(GUI アプリ単体で使用可能にする機能) MSRDC バージョン: 1.2.3770 Direct3D バージョン: 1.608.2-61064218 DXCore バージョン: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windowsバージョン: 10.0.22621.1413 ←(Windows11)
→更新が多いのは、一番下の「Windowsバージョン」
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ---
5. 参考:「Ubuntu」の再起動のやり方:
-
Ubuntu の「reboot」や「shutdown」コマンドは無効です。
-
「Ubuntu」の再起動のやり方はいくつかあります。
-
(1). 使っているターミナルの「PowerShell」、または、「+」タブで、新しく「PowerShell」を開きます:
PS C:\Users\user> wsl -t ubuntu : この操作を正しく終了しました。
-
一度使うと、コンソール履歴に残るので、最初に開く「PowerShell」で「Ubuntu」の起動や再起動を行うと決めておくと、「↑」キーだけで、入力できます。
-
(2). 起動して、使っていた「Ubuntu」タブに下記が表示:
[プロセスはコード 1 (0x00000001) で終了しました]
→その画面では「操作できなくなる」ので、「Ubuntu」タブを閉じます。
-
(3). 「Ubuntu」タブがなく、「PowerShell」で起動していた場合は、
ubn@FMVpc:/mnt/c/Users/user$
↓
PS C:\Users\user>
プロンプトが変化しただけですが「Ubuntu」が停止しました。
-
もし、「Ubuntu」の電源オフをしたいときは、このときに「ターミナル」の右上の「x」で閉じます。
-
(4). 「Ctrl+Shift+5」で「Ubuntu」を起動:
ubn@FMVpc:/mnt/c/Users/user$
→新しい「Ubuntu」タブが表示され、ターミナルの背景が紫色の「Ubuntu」が起動:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----
6.「WSL 2」の「Ubuntu」でシステム更新:
-
1). システム更新:
ubn@FMVpc:~$
ubn@FMVpc:/mnt/c/Users/user$
→立ち上げ方で作業ディレクトリは変わりますが、無視できます。
-
$ sudo apt update : Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB] Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB] Fetched 336 kB in 2s (194 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done All packages are up to date.
-
$ sudo apt upgrade : Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
-
2). 再起動:
-
3). OS の情報の表示:
ubn@FMVpc:/mnt/c/Users/user$
$ cat /etc/lsb-release : DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
→更新があり、「Ubuntu 22.04.2 LTS」になっています
$ cat /etc/os-release : PRETTY_NAME="Ubuntu 22.04.2 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.1 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy
-
4). カーネルのバージョンを表示:
$ uname -r 5.15.90.1-microsoft-standard-WSL2
→通常のUbuntu であれば「5.15.90-1-generic」のような表示です。
こちらの表示から、Linux カーネルが WSL2 用としてコンパイルされていることがわかります。
つまり、Linux カーネルのコンパイル時のオプションも違うのかもしれません。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- -----
7. 「WSL 2」の「Ubuntu」で標準で使える日本語フォント:
-
1). 作業前に、WSLで利用できるフォントの一覧を確認:
$ fc-list | sort : Command 'fc-list' not found, but can be installed with: sudo apt install fontconfig
-
2). 「fontconfig」のインストール:
$ sudo apt install fontconfig : The following NEW packages will be installed: fontconfig fontconfig-config fonts-dejavu-core libfontconfig1 libfreetype6
-
3). 作業前に、WSLで利用できるフォントの一覧を確認:
$ fc-list | sort : /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book /usr/share/fonts/truetype/ubuntu/Ubuntu-B.ttf: Ubuntu:style=Bold /usr/share/fonts/truetype/ubuntu/Ubuntu-BI.ttf: Ubuntu:style=Bold Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-C.ttf: Ubuntu Condensed:style=Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-L.ttf: Ubuntu,Ubuntu Light:style=Light,Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-LI.ttf: Ubuntu,Ubuntu Light:style=Light Italic,Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-M.ttf: Ubuntu,Ubuntu Light:style=Medium,Bold /usr/share/fonts/truetype/ubuntu/Ubuntu-MI.ttf: Ubuntu,Ubuntu Light:style=Medium Italic,Bold Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf: Ubuntu:style=Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-RI.ttf: Ubuntu:style=Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-Th.ttf: Ubuntu,Ubuntu Thin:style=Thin,Regular /usr/share/fonts/truetype/ubuntu/UbuntuMono-B.ttf: Ubuntu Mono:style=Bold /usr/share/fonts/truetype/ubuntu/UbuntuMono-BI.ttf: Ubuntu Mono:style=Bold Italic /usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf: Ubuntu Mono:style=Regular /usr/share/fonts/truetype/ubuntu/UbuntuMono-RI.ttf: Ubuntu Mono:style=Italic
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- -
7-1. 「Windows11」側に、フォントをインストール:
-
1). Adobe のフォントの入手先:
下記のフォントをGoogle では「別名」で提供しています。←(上記)
下記は使用に伴いライセンス登録が必要ですが、無料で使えます。
-
(1). 「源ノ明朝 (Source Han Serif)」明朝体(セリフ)
https://github.com/adobe-fonts/source-han-serif/archive/1.001R.zip
→Adobe、Google、イワタ で共同開発したオープンソースの明朝体のフォント
4つの言語(日本語、簡体中国語、繁体中国語および韓国語)で必要な文字をサポート
-
(2). 「源ノ角ゴシック (Source Han Sans)」ゴシック体
https://github.com/adobe-fonts/source-han-sans/archive/2.004R.zip
→Adobe、Google、で共同開発したオープンソースのゴシック体のフォント
4つの言語(日本語、簡体中国語、繁体中国語および韓国語)で必要な文字をサポート
-
(3). 「source-code-pro」
https://github.com/adobe-fonts/source-code-pro/archive/refs/tags/2.038R-ro/1.058R-it/1.018R-VAR.zip
-
2). Google のフォントの入手先:
https://www.google.com/get/noto/
→★ 今回使用しました。
-
3). Google の「zip」ファイルをダウンロード:
→Noto_Sans_JP.zip
→Noto_Serif_JP.zip
- 「等幅フォント:「Noto Sans Mono」](https://fonts.google.com/download?family=Noto%20Sans%20Mono)
→Noto_Sans_Mono.zip
-
4). ダウンロードした「zip」ファイルを展開:
-
(1). 「エクスプローラ」を起動
C:\Users\user\Downloads\
-
(2). 「zip」ファイルを右クリック →「すべて展開」
-
(3). 展開先のフォルダを指定
-
5). 「エクスプローラ」で、必要なフォントを右クリック→「インストール」ボタンをクリック
-
6). 「Windows11」を再起動
-
7). コントロールパネル →フォント で確認:
名前からして、CJK フォントの中の、日本語フォントだけがダウンロードされるかと思っていましたが、
フォントファイルには「すべての言語」が含まれていました。
-
8). これだと、サイズの節約になりません:
→インストールされたフォントで使わない言語のフォントは、選んで左上の「削除」をクリックしました。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- --
7-2.「Windows 11」側のフォントを「Ubuntu」で使えるように設定:
-
参考:
WSL上のXサーバで、Windows 10にインストールされているフォントを利用する
-
1). 「Ubuntu」で「fontconfig」パッケージをインストール:
$ sudo apt install fontconfg
-
2). 作業する前に、WSLで利用できるフォントの一覧を確認:
ubn@FMVpc:~$
$ fc-list | sort : /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book /usr/share/fonts/truetype/ubuntu/Ubuntu-B.ttf: Ubuntu:style=Bold /usr/share/fonts/truetype/ubuntu/Ubuntu-BI.ttf: Ubuntu:style=Bold Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-C.ttf: Ubuntu Condensed:style=Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-L.ttf: Ubuntu,Ubuntu Light:style=Light,Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-LI.ttf: Ubuntu,Ubuntu Light:style=Light Italic,Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-M.ttf: Ubuntu,Ubuntu Light:style=Medium,Bold /usr/share/fonts/truetype/ubuntu/Ubuntu-MI.ttf: Ubuntu,Ubuntu Light:style=Medium Italic,Bold Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf: Ubuntu:style=Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-RI.ttf: Ubuntu:style=Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-Th.ttf: Ubuntu,Ubuntu Thin:style=Thin,Regular /usr/share/fonts/truetype/ubuntu/UbuntuMono-B.ttf: Ubuntu Mono:style=Bold /usr/share/fonts/truetype/ubuntu/UbuntuMono-BI.ttf: Ubuntu Mono:style=Bold Italic /usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf: Ubuntu Mono:style=Regular /usr/share/fonts/truetype/ubuntu/UbuntuMono-RI.ttf: Ubuntu Mono:style=Italic
-
3). 「Windows 11」側のフォントを追加するための設定ファイルを作成:
$ sudo nano /etc/fonts/local.conf
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <dir>/mnt/c/Windows/Fonts</dir> </fontconfig>
Ctrl+O で保存(または、Ctrl+S で上書き保存)
Ctrl+X で終了
-
4). フォントキャッシュをクリアして再ロード
$ fc-cache -fv
→時間がかかります。
-
5). 「Ubuntu」で使えるようになった、「Windows11」側の「Noto」フォントの一覧を確認:
ubn@FMVpc:~$ fc-list | sort | grep Noto : /mnt/c/Windows/Fonts/NotoMono-Regular.ttf: Noto Mono:style=Regular /mnt/c/Windows/Fonts/NotoSans-Bold.ttf: Noto Sans:style=Bold /mnt/c/Windows/Fonts/NotoSans-BoldItalic.ttf: Noto Sans:style=Bold Italic /mnt/c/Windows/Fonts/NotoSans-Condensed.ttf: Noto Sans,Noto Sans Cond:style=Condensed,Regular /mnt/c/Windows/Fonts/NotoSans-CondensedBold.ttf: Noto Sans,Noto Sans Cond:style=Condensed Bold,Bold /mnt/c/Windows/Fonts/NotoSans-CondensedBoldItalic.ttf: Noto Sans,Noto Sans Cond:style=Condensed Bold Italic,Bold Italic /mnt/c/Windows/Fonts/NotoSans-CondensedItalic.ttf: Noto Sans,Noto Sans Cond:style=Condensed Italic,Italic /mnt/c/Windows/Fonts/NotoSans-Italic.ttf: Noto Sans:style=Italic /mnt/c/Windows/Fonts/NotoSans-Light.ttf: Noto Sans,Noto Sans Light:style=Light,Regular /mnt/c/Windows/Fonts/NotoSans-LightItalic.ttf: Noto Sans,Noto Sans Light:style=Light Italic,Italic /mnt/c/Windows/Fonts/NotoSans-Regular.ttf: Noto Sans:style=Regular /mnt/c/Windows/Fonts/NotoSansGeorgian-Bold.ttf: Noto Sans Georgian:style=Bold /mnt/c/Windows/Fonts/NotoSansGeorgian-Regular.ttf: Noto Sans Georgian:style=Regular /mnt/c/Windows/Fonts/NotoSansLisu-Regular.ttf: Noto Sans Lisu:style=Regular /mnt/c/Windows/Fonts/NotoSerif-Bold.ttf: Noto Serif:style=Bold /mnt/c/Windows/Fonts/NotoSerif-BoldItalic.ttf: Noto Serif:style=Bold Italic /mnt/c/Windows/Fonts/NotoSerif-Condensed.ttf: Noto Serif,Noto Serif Cond:style=Condensed,Regular /mnt/c/Windows/Fonts/NotoSerif-CondensedBold.ttf: Noto Serif,Noto Serif Cond:style=Condensed Bold,Bold /mnt/c/Windows/Fonts/NotoSerif-CondensedBoldItalic.ttf: Noto Serif,Noto Serif Cond:style=Condensed Bold Italic,Bold Italic /mnt/c/Windows/Fonts/NotoSerif-CondensedItalic.ttf: Noto Serif,Noto Serif Cond:style=Condensed Italic,Italic /mnt/c/Windows/Fonts/NotoSerif-Italic.ttf: Noto Serif:style=Italic /mnt/c/Windows/Fonts/NotoSerif-Light.ttf: Noto Serif,Noto Serif Light:style=Light,Regular /mnt/c/Windows/Fonts/NotoSerif-LightItalic.ttf: Noto Serif,Noto Serif Light:style=Light Italic,Italic /mnt/c/Windows/Fonts/NotoSerif-Regular.ttf: Noto Serif:style=Regular /mnt/c/Windows/Fonts/NotoSerifGeorgian-Bold.ttf: Noto Serif Georgian:style=Bold /mnt/c/Windows/Fonts/NotoSerifGeorgian-Regular.ttf: Noto Serif Georgian:style=Regular
→欲しかった「Noto」フォントが使えるようになりました:
共通で使えるフォントなので、ストレージ節約のために、「Ubuntu」側にインストールしなくても使えるように設定したつもりでした。
-
フォント名を指定してアプリを起動できます:
$ uxterm -fa 'migmix 2m'
-
アプリの中からフォントを選択できます:
$ uxterm -fa 'migmix 2m'
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ---
7-3. Ubuntu 側に、日本語フォント「fonts-noto-cjk」をインストール:
-
「項番 7-1.」の「Windows11」側のフォント(日本語のみ)を使えるようにすれば、「Ubuntu」側の作業は要らないと思っていました。でも、ダウンロードでのインストールだと漏れがあったようです。
-
Fetherpad で確認すると、「ウィンドウのタイトル名が豆腐に文字化け」が解消していません:
→「Ubuntu」側にも「fonts-noto-cjk」をインストールするのが良さそうです。
-
「Windows11」側のフォントを使えるようにしたので、重なりが出るので、ストレージを節約するなら、設定ファイルのフォルダ指定をさらに階層を下げて、細かく指定するのが良いかも。
-
「fonts-noto-cjk」の利点は一発で 3種のフォントがインストールできること。
難点は、使わない言語(中国語、韓国語)のフォントもインストールされるのでストレージが減ること。
-
$ sudo apt install fonts-noto-cjk : The following NEW packages will be installed: fonts-noto-cjk
-
$ sudo apt info fonts-noto-cjk : This package contains Noto font families for Traditional Chinese, Simplified Chinese, Japanese and Korean: . * Noto Sans CJK JP * Noto Sans CJK KR * Noto Sans CJK SC * Noto Sans CJK TC * Noto Sans Mono CJK JP * Noto Sans Mono CJK KR * Noto Sans Mono CJK SC * Noto Sans Mono CJK TC * Noto Serif CJK JP * Noto Serif CJK KR * Noto Serif CJK SC * Noto Serif CJK TC . These fonts are derived from the font family Source Han Sans. . The name "Noto" is short for "No Tofu", describing the aim of covering all living Unicode scripts. . Tofu (豆腐) is Japanese jargon for unicode replacement character "�" (U+FFFD) often displayed as replacement for unassigned or unknown characters. . This package contains regular and bold fonts.
-
抜粋 和訳:
これらのフォントは、Source Han Sans フォント ファミリーから派生したものです。 このパッケージには、通常のフォントと太字のフォントが含まれています。
-
4). フォントキャッシュをクリアして再ロード
$ fc-cache -fv
→時間がかかります。
-
使えるようになったフォントを確認:
ubn@FMVpc:~$ fc-list | sort : /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans CJK HK:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans CJK JP:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans CJK KR:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans CJK SC:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans CJK TC:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK HK:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK JP:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK KR:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK SC:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK TC:style=Bold /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans CJK HK:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans CJK JP:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans CJK KR:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans CJK SC:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans CJK TC:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK HK:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK JP:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK KR:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK SC:style=Regular /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK TC:style=Regular /usr/share/fonts/opentype/noto/NotoSerifCJK-Bold.ttc: Noto Serif CJK HK:style=Bold /usr/share/fonts/opentype/noto/NotoSerifCJK-Bold.ttc: Noto Serif CJK JP:style=Bold /usr/share/fonts/opentype/noto/NotoSerifCJK-Bold.ttc: Noto Serif CJK KR:style=Bold /usr/share/fonts/opentype/noto/NotoSerifCJK-Bold.ttc: Noto Serif CJK SC:style=Bold /usr/share/fonts/opentype/noto/NotoSerifCJK-Bold.ttc: Noto Serif CJK TC:style=Bold /usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc: Noto Serif CJK HK:style=Regular /usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc: Noto Serif CJK JP:style=Regular /usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc: Noto Serif CJK KR:style=Regular /usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc: Noto Serif CJK SC:style=Regular /usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc: Noto Serif CJK TC:style=Regular /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book /usr/share/fonts/truetype/ubuntu/Ubuntu-B.ttf: Ubuntu:style=Bold /usr/share/fonts/truetype/ubuntu/Ubuntu-BI.ttf: Ubuntu:style=Bold Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-C.ttf: Ubuntu Condensed:style=Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-L.ttf: Ubuntu,Ubuntu Light:style=Light,Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-LI.ttf: Ubuntu,Ubuntu Light:style=Light Italic,Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-M.ttf: Ubuntu,Ubuntu Light:style=Medium,Bold /usr/share/fonts/truetype/ubuntu/Ubuntu-MI.ttf: Ubuntu,Ubuntu Light:style=Medium Italic,Bold Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf: Ubuntu:style=Regular /usr/share/fonts/truetype/ubuntu/Ubuntu-RI.ttf: Ubuntu:style=Italic /usr/share/fonts/truetype/ubuntu/Ubuntu-Th.ttf: Ubuntu,Ubuntu Thin:style=Thin,Regular /usr/share/fonts/truetype/ubuntu/UbuntuMono-B.ttf: Ubuntu Mono:style=Bold /usr/share/fonts/truetype/ubuntu/UbuntuMono-BI.ttf: Ubuntu Mono:style=Bold Italic /usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf: Ubuntu Mono:style=Regular /usr/share/fonts/truetype/ubuntu/UbuntuMono-RI.ttf: Ubuntu Mono:style=Italic
→こちらの一覧に豆腐文字を解消する、「項番 7-2. 5).」のリストに含まれていないフォントがあるはずです。
もしかしたら、同じフォントは存在していても、期待しているフォント名ではないのかもしれません。
-
ちなみに、「Xubuntu 22.04.02 LTS」の場合は、下記のフォント指定がありました:
設定 →「ウィンドウマネージャ」→タイトルのフォント
Noto Sans Bold 9
-
「Ubuntu 22.04.02 LTS」、しかもデスクトップ環境なしだと、たぶん、デフォルト値だろうと思います。
上記は CJK ではないけど、文字化けしていません。「項番 7-2.」では、インストールだけでなく、「リンク作業が必要」なのかもしれません。
-
ウィンドウのタイトル名が「豆腐に文字化け」が解消:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----
8.「Ubuntu」のロケールを日本語(ja_JP)に変更:
-
1). 作業前の確認:
$ date : Thu Mar 9 22:02:09 JST 2023
-
$ locale : LANG=C.UTF-8 LANGUAGE= LC_CTYPE="C.UTF-8" LC_NUMERIC="C.UTF-8" LC_TIME="C.UTF-8" LC_COLLATE="C.UTF-8" LC_MONETARY="C.UTF-8" LC_MESSAGES="C.UTF-8" LC_PAPER="C.UTF-8" LC_NAME="C.UTF-8" LC_ADDRESS="C.UTF-8" LC_TELEPHONE="C.UTF-8" LC_MEASUREMENT="C.UTF-8" LC_IDENTIFICATION="C.UTF-8" LC_ALL=
-
2). 「language-pack」のインストール:
$ sudo apt install language-pack-ja language-pack-gnome-ja : The following NEW packages will be installed: language-pack-gnome-ja language-pack-gnome-ja-base language-pack-ja language-pack-ja-base
-
3). ロケールを日本語に変更:
$ sudo update-locale LANG=ja_JP.UTF8
-
4). 再起動:
PS C:\Users\user> wsl -t ubuntu : この操作を正しく終了しました。
-
PS C:\Users\user> wsl ubn@FMVpc:/mnt/c/Users/user$
-
5). 作業後の確認:
$ locale : LANG=ja_JP.UTF8 LANGUAGE= LC_CTYPE="ja_JP.UTF8" LC_NUMERIC="ja_JP.UTF8" LC_TIME="ja_JP.UTF8" LC_COLLATE="ja_JP.UTF8" LC_MONETARY="ja_JP.UTF8" LC_MESSAGES="ja_JP.UTF8" LC_PAPER="ja_JP.UTF8" LC_NAME="ja_JP.UTF8" LC_ADDRESS="ja_JP.UTF8" LC_TELEPHONE="ja_JP.UTF8" LC_MEASUREMENT="ja_JP.UTF8" LC_IDENTIFICATION="ja_JP.UTF8" LC_ALL=
-
$ date : 2023年 3月 9日 木曜日 22:11:31 JST
→日本語表示できました。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- -----
9.「Ubuntu」によく使うアプリをインストール:
-
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- -
9-1. 任意: ターミナルの「xfce4-terminal」をインストール:
-
「Windows11」には「PowerShell」を起動すると使える「Windows ターミナル」があるので、追加は任意です。
日本語入力の切り分け作業のために、Xubuntu(Ubuntu のXfce デスクトップ版)の標準のターミナルをインストールしました。「Windows ターミナル」だとコマンドを混在できるので混乱します。シンプルに Bash で使う「xfce4-terminal」の方が使いやすいかも。
-
日本語入力の切り分け作業について:
「Windows ターミナル」は、「Windows11」のIME が使われるので最初から日本語入力可能です。
確認のため、純粋なLinux のターミナルである「xfce4-terminal」をインストールしてみました。
→結論は、「xfce4-terminal」でも、「Windows11」のIME が使われ、日本語入力できました。
-
1). 「xfce4-terminal」のインストール:
$ sudo apt install xfce4-terminal : 以下のパッケージが新たにインストールされます: exo-utils libexo-2-0 libexo-common libice6 libsm6 libstartup-notification0 liburi-perl libvte-2.91-0 libvte-2.91-common libx11-xcb1 libxcb-util1 libxfce4ui-2-0 libxfce4ui-common libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-3 xfce4-terminal xfconf アップグレード: 0 個、新規インストール: 19 個、削除: 0 個、保留: 0 個。
-
2). 「xfce4-terminal」の起動:
-
(1). 「Ubuntu ターミナル」からの起動:
$ xfce4-terminal &
: セッションマネージャーへの接続に失敗しました: SESSION_MANAGER environment variable not defined
→「&」を付けた方がエラーがあっても継続できます。
-
(2). 「Windows」メニューからの起動:
「Windows」キー→「x」と入力→「Xfce4 Terminal (Ubuntu)」 をクリック
-
3). 「xfce4-terminal」が別のウィンドウで開きました:
ubn@FMVpc:/mnt/c/Users/user$
-
4). 使ってみました:
$ ls /usr/share/applications/ : byobu.desktop org.freedesktop.IBus.Panel.Emojier.desktop vim.desktop htop.desktop org.freedesktop.IBus.Panel.Extension.Gtk3.desktop xfce4-terminal-settings.desktop im-config.desktop org.freedesktop.IBus.Setup.desktop xfce4-terminal.desktop info.desktop python3.10.desktop io.snapcraft.SessionAgent.desktop snap-handle-link.desktop
-
ubn@FMVpc:/mnt/c/Users/user$ cat /usr/share/applications/im-config.desktop : [Desktop Entry] Name=Input Method Comment=Set Keyboard Input Method Type=Application Keywords=keyboard;input Exec=im-config Terminal=false Icon=input-keyboard Categories=Settings X-AppStream-Ignore=true OnlyShowIn=KDE;LXQt; X-Ubuntu-Gettext-Domain=im-config
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- --
9-2. 任意:「Ubuntu」の「ファイルマネージャ」をインストール:
-
「Windows11」には「エクスプローラ」があり、パス指定で「\\wsl$\Ubuntu\
」を使えば兼用できるので、追加は任意です。手間が減らせます。
-
Ubuntu(GNOME の場合の)のデフォルトの「ファイルマネージャ」のパッケージ名は「nautilus」(ノーチラス)です。
わかりづらいからか、GUI での表示は「Files」(ファイル)です。
見やすいことと、拡張機能があるのが特徴です。
-
1). 「nautilus」のインストール:
$ sudo apt install nautilus : 以下のパッケージが新たにインストールされます: desktop-file-utils fdisk gcr gdisk gnome-desktop3-data gnome-keyring gnome-keyring-pkcs11 gvfs gvfs-backends gvfs-common gvfs-daemons gvfs-libs libarchive13 libatasmart4 libavahi-glib1 libblockdev-crypto2 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2 libblockdev-part2 libblockdev-swap2 libblockdev-utils2 libblockdev2 libcdio-cdda2 libcdio-paranoia2 libcdio19 libcue2 libdbusmenu-glib4 libdee-1.0-4 libexempi8 libexif12 libexiv2-27 libfdisk1 libgck-1-0 libgcr-base-3-1 libgcr-ui-3-1 libgd3 libgdata-common libgdata22 libgexiv2-2 libgif7 libgnome-autoar-0-0 libgnome-desktop-3-19 libgoa-1.0-0b libgoa-1.0-common libgpgme11 libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgsf-1-114 libgsf-1-common libgxps2 libimobiledevice6 libldb2 libmtp-common libmtp-runtime libmtp9 libnautilus-extension1a libnfs13 libnm0 libnspr4 libnss3 libpam-gnome-keyring libparted-fs-resize0 libplist3 libpoppler-glib8 libpoppler118 libsmbclient libtalloc2 libtevent0 libtotem-plparser-common libtotem-plparser18 libtracker-sparql-3.0-0 libudisks2-0 libunity-protocol-private0 libunity-scopes-json-def-desktop libunity9 libupower-glib3 libusbmuxd6 libvolume-key1 libwbclient0 libxkbregistry0 libxpm4 nautilus nautilus-data p11-kit p11-kit-modules pinentry-gnome3 poppler-data python3-ldb python3-talloc samba-libs tracker tracker-extract tracker-miner-fs udisks2 upower usbmuxd アップグレード: 0 個、新規インストール: 98 個、削除: 0 個、保留: 0 個。
-
2). 「nautilus」の起動:
-
(1). 「Ubuntu ターミナル」からの起動:
$ files &
-
(2). 「Windows」メニューからの起動:
「Windows」キー→「file」と入力→「Files (Ubuntu)」 をクリック
-
インストール時のパッケージ名と、GUI でのアプリ名が違うので注意です。
-
(3). 起動した画面:
→デスクトップ環境がないので、テーマやアイコンの指定ができないため、 デフォルトのシンプルな画像が表示されます。アイコンは多分「Adwaita」
-
3). 参考: 「Ubuntu」のファイルシステムを「Windows エクスプローラ」で開くには、:
explorer.exe .
→現在のディレクトリを開くために、必ずコマンドの最後にピリオドを追加します。
-
(1). 指定のしかたが正しいか確認:
PS C:\Users\user> ls \\wsl$\Ubuntu\ ディレクトリ: \\wsl$\Ubuntu Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 2023/03/06 月 14:40 lost+found d----- 2023/03/18 土 9:39 proc d----- 2023/03/18 土 9:39 dev d----- 2023/01/04 水 6:40 srv d----- 2023/01/04 水 6:40 opt d----- 2023/01/04 水 6:41 var d----- 2022/04/18 月 19:28 boot d----- 2023/03/18 土 20:41 tmp d----- 2023/03/06 月 14:50 home d----- 2023/01/04 水 6:40 usr d----- 2023/01/04 水 6:41 snap d----- 2023/03/18 土 20:41 etc d----- 2023/03/18 土 9:39 run d----- 2023/03/09 木 23:03 root d----- 2023/03/06 月 14:40 mnt d----- 2023/03/18 土 9:38 sys d----- 2023/01/04 水 6:40 media -----l 2023/01/04 水 6:40 7 bin ------ 1970/01/01 木 9:00 1955960 init -----l 2023/01/04 水 6:40 9 lib64 -----l 2023/01/04 水 6:40 7 lib -----l 2023/01/04 水 6:40 8 sbin -----l 2023/01/04 水 6:40 9 lib32 -----l 2023/01/04 水 6:40 10 libx32
-
(2). 「Linux」のルートに移動:
PS C:\Users\user> cd \\wsl$\Ubuntu\ PS Microsoft.PowerShell.Core\FileSystem::\\wsl$\Ubuntu>
→ネットワーク(Linux ディストリビューション)にアクセス
-
(3). 「Windows エクスプローラ」で開く:
PS Microsoft.PowerShell.Core\FileSystem::\\wsl$\Ubuntu> explorer.exe .
→「.
」に注意
-
4). 参考: 「Windows ターミナル」で、Linux のコマンドを実行:
PS C:\Users\user> wsl ls -la
→Linux の「ls -la」コマンドが使えます。
-
5). 参考: 「ファイルシステム」で、最速のパフォーマンス速度を実現するには:
システム全体のファイルにアクセスできますが、「Linux」(ext4) と「Windows」(ntfs) ではファイル形式が異なるので、どちらのOS で、どちらの場所をアクセスするかで、パフォーマンスが大幅に低下する可能性があります。
-
「Linux ツール」を使用して Linux 環境 (Ubuntu など) で作業する場合、
→ファイルを WSL ファイル システムに格納するのがベター。
-
「Windows ツール」を使用して Windows 環境 (PowerShell、コマンド プロンプト) で作業する場合、
→ファイルを Windows ファイル システムに格納するのがベター。
-
例えば、「Linux」ファイルを格納する場合であれば:
-
(1).「Linux」のルート ディレクトリを使うのがベター:
PS C:\Users\user> ls \\wsl$\Ubuntu\home\user\
→「Linux」指定に「\wsl$\Ubuntu\」が使えます。これ以上は分解できません。
-
(2).「Windows11」のルート ディレクトリは使いません:
「PowerShell」にて、
PS C:\Users\user> ls C:\Users\user\
または
「Ubuntu」タブにて、
ubn@FMVpc:/mnt/c/Users/user$ ls /mnt/c/Users/user/
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ---
9-3. 任意:「Ubuntu」のデフォルトのテキストエディタ「gedit」をインストール:
-
gnome 系の標準のテキストエディタで、万能で拡張機能があるのが特徴です。
パッケージ名は「gedit」(ジーエディット)ですが、 わかりやすいように、GUI での表示は「Text editor」(テキストエディター)です。
-
個人的には、背景にグリッド(細かな網目)を入れられるのがグッドです。クールです。
-
1). インストール:
$ sudo apt install gedit
→「im-config」の依存パッケージでもある、「zenity」が一緒に入りました。
-
2). 起動:
-
(1). 「Ubuntu ターミナル」からの起動:
$ gedit &
→「&」の前に、新規作成や編集したいファイル名を指定できます。
-
(2). 「Windows」メニューからの起動:
「Windows」キー→「te」と入力→「Text editor (Ubuntu)」 をクリック
-
インストール時のパッケージ名と、GUI でのアプリ名が違うので注意です。
-
(3). 起動した画面:
→設定で、ミニマップの表示と、背景にマス目の表示を指定しています。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----
9-4. 任意:「Ubuntu」に、テキストエディタの「Featherpad」をインストール:
-
Lubuntu (Ubuntu の LXQt デスクトップ版)の標準のテキストエディタです。
-
個人的にMarkdown ファイルでテキストは作成するので、Markdown ファイルのハイライト表示が見やすい色使いで、 「検索」や「置換」の機能が使いやすいので、よく使います。
-
「Qt アプリ」(Qt5 ライブラリが使われているアプリ)は日本語入力で問題が出やすいので、その動作確認にも使用。
これが動けば、ほとんどの「Qt アプリ」で日本語入力できます。
-
1). インストール:
$ sudo apt install featherpad
-
2). 起動:
-
(1). 「Ubuntu ターミナル」からの起動:
$ featherpad &
→「&」の前に、新規作成や編集したいファイル名を指定できます。
-
(2). 「Windows」メニューからの起動:
「Windows」キー→「fe」と入力→「Featherpad (Ubuntu)」 をクリック
-
(3). 起動した画面:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- -
9-5. 任意:「Ubuntu」に、ESR 版の「Firefox」をインストール:
-
前回、「Windows11」にも ESR 版の「Firefox」をインストールしており、うまくやれば兼用できるので、追加は任意です。
-
ただし、Firefox のダウンロードサイトのように、OS の種別から自動でダウンロードを行うイメージを選択するサイトだと、ひと手間になるので、Linux 側にもインストールしておくと便利です。
-
ESR 版にすることで、起動を速くできます。更新回数も減ります。 「広告ブロック」や「翻訳」のプラグインの追加が簡単です。
-
1). 「Ubuntu」で足りないパッケージをインストール:
WSL の「Ubuntu」には最小限のパッケージしかインストールされていません。
-
「.tar.bz2 解凍」のパッケージをインストール:
$ sudo apt install bzip2 : 以下のパッケージが新たにインストールされます: bzip2
-
firefox 起動時のエラー対策:
$ sudo apt install libdbus-glib-1-2 : 以下のパッケージが新たにインストールされます: libdbus-glib-1-2
→上記がないと、起動時に下記のエラーが発生します:
$ firefox --version : XPCOMGlueLoad error for file /opt/firefox/libxul.so: libdbus-glib-1.so.2: cannot open shared object file: No such file or directory Couldn't load XPCOM.
-
2). ダウンロードするフォルダを準備:
$ mkdir -p ~/Downloads/apps $ cd ~/Downloads/apps/
-
3). ESR 版の「Firefox」をインストール:
-
(1). firefox をダウンロード
2023-03-19 現在:
以前、動いた実績のあるバージョン:
firefox-102.8.0esr.tar.bz2 2023-02-14
→下記でダウンロード:
$ sudo wget https://archive.mozilla.org/pub/firefox/releases/102.8.0esr/linux-x86_64/ja/firefox-102.8.0esr.tar.bz2
: 2023-03-19 15:25:37 (8.79 MB/s) - ‘firefox-102.8.0esr.tar.bz2’ へ保存完了 [77610028/77610028]
-
(2). ダウンロードしたファイルを展開:
$ tar xjf firefox-*.tar.bz2 $
-
(3). 展開した Firefox フォルダを「/opt」に移動:
$ sudo mv firefox /opt
$ ls /opt firefox
-
(4). Firefox の実行ファイルへのシンボリックリンクを作成:
$ sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox
-
(5). firefox の「デスクトップファイル」をダウンロード
$ sudo wget https://raw.githubusercontent.com/mozilla/sumo-kb/main/install-firefox-linux/firefox.desktop -P /usr/local/share/applications
: 2023-03-19 15:32:49 (13.6 MB/s) - ‘/usr/local/share/applications/firefox.desktop.2’ へ保存完了 [608/608]
-
(6). 「Ubuntu」を再起動:
一度、再起動しないと ESR 版が起動されません。
-
-
4). 「Firefox」を起動:
$ firefox --version : Mozilla Firefox 102.8.0esr
-
$ which firefox /usr/local/bin/firefox
-
起動:
$ firefox &
-
起動した画面:
→シンプルです。
プラグインを追加すれば、見映えは変更できますが、
「広告ブロック」と「翻訳」のプラグインだけを追加しました。
タイトルバーの「firefox」のアイコンにペンギン(Linux マーク)が付いています。
-
5). ダウンロードフォルダを「~/ダウンロード」から、「~/Downloads」に変更:
$ ls Desktop Downloads ダウンロード
→firefox で設定を開くと「ダウンロード」フォルダが自動で作成されます。
日本語名だとコマンドで使いづらいので変更しました。
-
6). フォントを「MS Gothic」から「Not Sans CJK」に変更:
-
7). アプリの起動時に更新があり、バージョンが上がりました:
$ firefox --version : Mozilla Firefox 102.9.0esr
-
8). ちなみに、「Windows」メニューから起動するときは、
「Windows」ボタン→「fi」と入力→「Firefox Web Browser (Ubuntu)」をクリック
-
「(Ubuntu)」が付いている方を選びます。「Firefox」は選択誤りで、Windows 側のアプリです。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- -----
10.「WSL2」での日本語入力:
-
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- -
10-1.「WSL2」の「Windows ターミナル」を使って、Ubuntu の「CUI アプリ」で日本語入力:
-
「nano」や「vi」などの Ubuntu の CUI アプリでは、「Windows」のIME で日本語入力できます。
-
1). 「項番 8. 」までの設定で、日本語表示:
-
2). 「Ubuntu」を起動:
-
3-1). 「CUI アプリ」の「nano」を使ってみる:
$ nano test.txt
Ctrl+k で行削除
Ctrl+o で保存
Ctrl+x で終了(または、保存せず終了)
-
3-2). 「CUI アプリ」の「vi」を使ってみる:
「vim」にしてもよいけどマウスでの使用感が違う場合があります。
$ vi test.txt
「i」で入力
「dd」で行削除
「:wq」で保存終了
「:q!」で保存せず終了
-
4). 「CUI アプリ」で、「半角/全角」キーを押せば、日本語入力できます:
-
→「Windows11」の日本語入力の「IME」が使われます。
→「半角/全角」キーを押したときに、「Windows11」の右下の「A」が「あ」に変化します。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- --
10-2.「Ubuntu」のターミナル「xfce4-terminal」を使って、「CUI アプリ」で日本語入力:
-
「nano」や「vi」などの Ubuntu の CUI アプリは、「WSL2」の「Windows ターミナル」でUbuntu を起動すれば、「Windows」のIME で日本語入力できました
-
→「Ubuntu」のターミナル「xfce4-terminal」を使っても、日本語入力できるのか確認しました:
-
(1). 「xfce4-terminal」で「半角/全角」キーを押して、コマンド行に日本語入力してみる:
ubn@FMVpc:~$ ubn@FMVpc:~$ テスト テスト: コマンドが見つかりません
「半角/全角」キーを押すと、「Windows11」のパネル右にある「A」が「あ」に変化するので、「Windows」のIME が使われていることがわかります。日本語候補の窓も黒色です。
入力するときは、画面をいったんクリックするのがコツ
-
(2). 「xfce4-terminal」にて、コマンドで「nano」を起動して、編集画面で「半角/全角」キーを押して、日本語を入力:
ubn@FMVpc:~$ nano
test テスト
Ctrl+X
保存「n」
-
CUI アプリ(テキストベースのアプリ)であれば、使っているターミナルが違っても「Windows」のIME で日本語入力できました
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ---
10-3.「WSL2」の「GUI アプリ」で、日本語入力:
-
1). 「GUI アプリ」で日本語表示されるように設定:
-
2). Linux の GUI アプリ「gedit」、「featherpad」で確認:
→「Windows」の IME で日本語入力しようとしても、できませんでした:
-
3). 「WSL2」は、デスクトップ環境のない特殊な環境です
「ibus-daemon」がうまく動かないと使えない「ibus-mozc」は、難しいです
-
4). 参考: 「ibus-mozc」で日本語入力にトライ:
「ibus-mozc」をインストールして設定を追加
「ibus-daeamon」を起動
「GUI アプリ」で英語の入力はOK。
日本語入力しようと「半角/全角」キーを押すと、キーを受け付けなくなり、画面が固まりました。
-
設定の「Mozc プロパティ」(/usr/lib/mozc/mozc_tool --mode=config_dialog) を起動:
→設定の初期化はできますが、その後「編集」ボタンが効きません。
固まりました:
何かしらの機能が足りないか、何かしらのサービスを動かす必要がありそう。
-
個人的には、「Mozc プロパティ」でキーの割当をカスタマイズできないのは痛いです。
-
5). 「fcitx-mozc」での日本語入力は「レビュー記事」があるので出来そうです:
参考:
エディタGEDITのインストールと日本語入力環境の整備 on WSL2 + Windows 11
-
6). また、「デスクトップ環境」をインストールすれば、「ibus-mozc」を使うことはできるかも
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----
11. 「fcitx-mozc」で日本語入力:
-
参考:
VirtualBox の「Arch Linux」に「OpenBox」デスクトップ〈H123〉:(日本語入力)
-
1). システム更新:
$ sudo apt update $ sudo apt upgrade
-
2). インストール:
$ sudo apt install fcitx-mozc
以下のパッケージが新たにインストールされます: fcitx fcitx-bin fcitx-config-common fcitx-config-gtk fcitx-data fcitx-frontend-all fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-frontend-qt5 fcitx-module-dbus fcitx-module-kimpanel fcitx-module-lua fcitx-module-quickphrase-editor5 fcitx-module-x11 fcitx-modules fcitx-mozc fcitx-mozc-data fcitx-ui-classic im-config libabsl20210324 libfcitx-config4 libfcitx-core0 libfcitx-gclient1 libfcitx-qt5-1 libfcitx-qt5-data libfcitx-utils0 libgail-common libgail18 libgettextpo0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common liblua5.2-0 libpresage-data libpresage1v5 libprotobuf23 libtinyxml2.6.2v5 libxkbfile1 mozc-data mozc-server mozc-utils-gui presage アップグレード: 0 個、新規インストール: 42 個、削除: 0 個、保留: 0 個。
-
3). 「~/.bash_profile」の修正:
$ nano ~/.bash_profile
↓ ファイルの最後に追記:
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" sleep 1; fcitx-autostart
Ctrl + O で保存
Ctrl + X で終了
-
4). 「im-config」で IME を設定:
-
(1). 「Ubuntu ターミナル」で
$ im-config
-
(2). 「インプットメソッド設定」画面が表示:
→「OK」
→「はい」
-
(3). 「fcitx」にチェック
→「OK」
説明が表示:
ユーザー設定 /home/ubn/.xinputrc を fcitx と設定する。 マニュアル設定による選択: fcitx Flexible Input Method Framework (fcitx) * Required for all: fcitx * Language specific input conversion support: * Simplified Chinese: fcitx-libpinyin or fcitx-sunpinyin or fcitx-googlepinyin * Traditional Chinese / generic Chinese: fcitx-rime * Generic keyboard translation table: fcitx-table* packages * Application platform support: Installing fcitx-frontend-all will cover all GUI platforms. * GNOME/GTK: fcitx-frontend-gtk2 and fcitx-frontend-gtk3 (both) * KDE/Qt5: fcitx-frontend-qt5 The ユーザー設定 is modified by im-config. Restart the session to activate the new ユーザー設定. Xセッションマネージャーによって前の設定のデーモンプログラムが再起動される場合は、kill(1)を用いて手動でkillする必要があるかもしれません。 詳細は、im-config(8)と/usr/share/doc/im-config/README.Debian.gzを参照してください。
-
(4). 設定されたか確認:
$ cat ~/.xinputrc : # im-config(8) generated on Fri, 17 Mar 2023 19:51:52 +0900 run_im fcitx # im-config signature: 8e9df9aa8f7bcd5f85ee395e99f9205e -
-
5). 「Ubuntu」を再起動:
→設定を反映させます。
-
6). GUI アプリで日本語入力できるか確認:
-
(1). 「gedit」を起動して確認:
$ gedit &
→「半角/全角」キーを押すと、日本語入力できました。
-
(2). 「featherpad」を起動して確認:
$ featherpad &
→「半角/全角」キーを押すと、日本語入力できました。
-
「&
」を付けているのは、固まっても抜けやすくするためです。
警告メッセージがたくさん表示されますが、無視できます。
Enter を押せば、プロンプトが返ってきます。
-
Linux アプリが固まってしまってしまった場合:
「ターミナル」の「+」タブをクリックして、「PowerShell」画面を開き、
「Ubuntu」を停止します:
PS C:\Users\user> wsl -t ubuntu : この操作を正しく終了しました。
→アプリのウィンドウが閉じるはずです。(Ubuntu も終了)
-
コマンドを一度使うと「コンソール履歴」に残るので、「PowerShell」で「↑」キーを押すだけで、入力できます。
-
「半角/全角」キーを押すと、画面に「.................」が入力されっ放しになる場合:
「fcitx-mozc」の設定ファイルが乱れています。
-
上記の「Linux アプリが固まってしまってしまった場合」の手順で、「Ubuntu」を停止して、「Ubuntu」を起動して操作:
-
「fcitx-mozc」をアンインストール後、設定ファイルを削除:
$ sudo apt remove fcitx-mozc
$ cd ~/.config/ $ rm -r ibus $ rm -r fcitx $ rm -r mozc
-
→「項番 2). 」のインストールからやり直します。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- -----
11-1. 日本語入力のキー割当を別々のキーに変更:
-
日本語入力しやすいように設定を変更しました:
「半角/全角」キーだけで日本語オン・オフするなら、この作業は不要です。
-
インストールされたアプリを確認:
$ apt list fcitx-config* : fcitx-config-common/jammy,now 0.4.10-3 all [インストール済み、自動] fcitx-config-gtk/jammy,now 0.4.10-3 amd64 [インストール済み、自動]
-
$ ls /usr/bin/fcitx* /usr/bin/fcitx /usr/bin/fcitx-diagnose /usr/bin/fcitx-autostart /usr/bin/fcitx-remote /usr/bin/fcitx-config-gtk3 /usr/bin/fcitx-skin-installer /usr/bin/fcitx-configtool /usr/bin/fcitx4-config /usr/bin/fcitx-dbus-watcher
-
1). 「fcitx-configtool」を起動:
$ fcitx-configtool
-
2). 「入力メソッドの設定」画面:
-
「入力メソッド」タブ:
キーボード - 英語(US) Mozc
↓ 「キーボード - 日本語」追加:
↓ 「キーボード - 英語(US)」削除:
キーボード - 日本語 Mozc
-
-
3). 日本語オンオフのキーの割り当てを追加:
日本語入力がしやすいように別々の「日本語 キーボード」のキーに割当を定義しました:
-
「全体の設定」タブ→一番下の「Show Advanced Options」にチェック
入力メソッドをオンに 「空」 「空」 入力メソッドをオフに 「空」 「空」
↓
入力メソッドをオンに 「Henkanmode」 「空」 入力メソッドをオフに 「Muhenkan」 「空」
-
-
右上の「x」で閉じます。
-
残念ながら今回は、「入力メソッドをオン」に、いつも使う「Hiraganakatakana」(ひらがな キー)が登録できませんでした。なので、「Henkanmode」(変換 キー)を登録しました。
-
4). テキストエディタで、日本語入力するときの操作:
- 日本語オン・オフ: Ctrl+スペース / 半角/全角 ←(デフォルトの定義) - 日本語オン: 変換 ←(追加の定義) - 日本語オフ: 無変換 ←(追加の定義)
→上記のキーで、「日本語オン/オフ」できるようになりました。
-
「半角/全角」キーでオンオフすると、日本語候補窓の「Mozc」が点滅しますが、
-
「変換」キーで日本語オン、「無変換」キーで日本語オフすると、「Mozc」の点滅が少なくなります。
「半角/全角」キーを使わなくても、「変換」キーを押してから日本語入力、「無変換」キーを押してから英語入力できるはずです。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- -
11-2. 参考: 「Windows11」の「IME」の設定方法:
-
参考:
ご存じでしたか? Microsoft IMEの設定方法が変わりました【Windows 10 バージョン2004以降/11】
Windows11 の標準の日本語入力システム「Microsoft IME」では、デフォルトで[半角/全角]キーがIMEのオン/オフの切り替えとなっています。IMEのオン/オフの切り替えキーを別のキーに変更しました。
ただし、新しいMicrosoft IMEでは、[変換]キーや[無変換]キーなど、特定のキーしか、機能の割り当てができなくなっています。
-
1). 「Microsoft IME」画面を表示させる手順:
-
(1). Windows11」にて、「設定」アプリを起動:
-
(2). [設定]アプリの右側で「時刻と言語」を選択
-
(3). 右側の「言語と地域」をクリック
-
(4). 「言語と地域」画面が開くので「日本語」の「…」をクリック
-
(5). メニューの「言語オプション」を選択
-
(6). 「オプション」画面が開くので「キーボード」欄の「Microsoft IME」の「…」をクリック
-
(7). メニューの「キーボードオプション」を選択
-
2). 「Microsoft IME」画面が表示:
→「キーとタッチのカスタマイズ」をクリック
[キータッチのカスタマイズ]画面が表示:
-
3). キーの割り当てを変更:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- --
12. 参考: 「Xubuntu 22.0.2 LTS」で使っている「fonts」:
-
Xfce デスクトップ環境の「Xubuntu 22.0.2 LTS」で使っている「fonts」を記述しました。
個人的に追加しているフォントや、未使用の言語のフォントも含まれます。
-
Fontconfig が利用するフォントパスは「/usr/share/fonts/」や「~/.local/share/fonts」です (「~/.fonts/」は非推奨)。
これらのフォルダを Fontconfig は再帰的にスキャンします。
-
使用しているフォントファイルの一覧:
(Fontconfig が認識しているフォントの一覧)
$ fc-list : file | sort : /usr/local/share/fonts/SourceHanCodeJP.ttc: ←(追加: 源ノ角ゴシック Code JP) /usr/share/fonts/X11/Type1/c0419bt_.pfb: /usr/share/fonts/X11/Type1/c0582bt_.pfb: /usr/share/fonts/X11/Type1/c0583bt_.pfb: /usr/share/fonts/X11/Type1/c0611bt_.pfb: /usr/share/fonts/X11/Type1/c0632bt_.pfb: /usr/share/fonts/X11/Type1/c0633bt_.pfb: /usr/share/fonts/X11/Type1/c0648bt_.pfb: /usr/share/fonts/X11/Type1/c0649bt_.pfb: /usr/share/fonts/opentype/malayalam/Chilanka-Regular.otf: /usr/share/fonts/opentype/malayalam/Gayathri-Bold.otf: /usr/share/fonts/opentype/malayalam/Gayathri-Regular.otf: /usr/share/fonts/opentype/malayalam/Gayathri-Thin.otf: /usr/share/fonts/opentype/malayalam/Manjari-Bold.otf: /usr/share/fonts/opentype/malayalam/Manjari-Regular.otf: /usr/share/fonts/opentype/malayalam/Manjari-Thin.otf: /usr/share/fonts/opentype/mathjax/MathJax_AMS-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Caligraphic-Bold.otf: /usr/share/fonts/opentype/mathjax/MathJax_Caligraphic-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Fraktur-Bold.otf: /usr/share/fonts/opentype/mathjax/MathJax_Fraktur-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Main-Bold.otf: /usr/share/fonts/opentype/mathjax/MathJax_Main-Italic.otf: /usr/share/fonts/opentype/mathjax/MathJax_Main-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Math-BoldItalic.otf: /usr/share/fonts/opentype/mathjax/MathJax_Math-Italic.otf: /usr/share/fonts/opentype/mathjax/MathJax_Math-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_SansSerif-Bold.otf: /usr/share/fonts/opentype/mathjax/MathJax_SansSerif-Italic.otf: /usr/share/fonts/opentype/mathjax/MathJax_SansSerif-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Script-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Size1-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Size2-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Size3-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Size4-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Typewriter-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_Vector-Bold.otf: /usr/share/fonts/opentype/mathjax/MathJax_Vector-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_WinChrome-Regular.otf: /usr/share/fonts/opentype/mathjax/MathJax_WinIE6-Regular.otf: /usr/share/fonts/opentype/noto/NotoSansCJK-Black.ttc: /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc: /usr/share/fonts/opentype/noto/NotoSansCJK-DemiLight.ttc: /usr/share/fonts/opentype/noto/NotoSansCJK-Light.ttc: /usr/share/fonts/opentype/noto/NotoSansCJK-Medium.ttc: /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc: /usr/share/fonts/opentype/noto/NotoSansCJK-Thin.ttc: /usr/share/fonts/opentype/noto/NotoSerifCJK-Black.ttc: /usr/share/fonts/opentype/noto/NotoSerifCJK-Bold.ttc: /usr/share/fonts/opentype/noto/NotoSerifCJK-ExtraLight.ttc: /usr/share/fonts/opentype/noto/NotoSerifCJK-Light.ttc: /usr/share/fonts/opentype/noto/NotoSerifCJK-Medium.ttc: /usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc: /usr/share/fonts/opentype/noto/NotoSerifCJK-SemiBold.ttc: /usr/share/fonts/opentype/urw-base35/C059-BdIta.otf: /usr/share/fonts/opentype/urw-base35/C059-Bold.otf: /usr/share/fonts/opentype/urw-base35/C059-Italic.otf: /usr/share/fonts/opentype/urw-base35/C059-Roman.otf: /usr/share/fonts/opentype/urw-base35/D050000L.otf: /usr/share/fonts/opentype/urw-base35/NimbusMonoPS-Bold.otf: /usr/share/fonts/opentype/urw-base35/NimbusMonoPS-BoldItalic.otf: /usr/share/fonts/opentype/urw-base35/NimbusMonoPS-Italic.otf: /usr/share/fonts/opentype/urw-base35/NimbusMonoPS-Regular.otf: /usr/share/fonts/opentype/urw-base35/NimbusRoman-Bold.otf: /usr/share/fonts/opentype/urw-base35/NimbusRoman-BoldItalic.otf: /usr/share/fonts/opentype/urw-base35/NimbusRoman-Italic.otf: /usr/share/fonts/opentype/urw-base35/NimbusRoman-Regular.otf: /usr/share/fonts/opentype/urw-base35/NimbusSans-Bold.otf: /usr/share/fonts/opentype/urw-base35/NimbusSans-BoldItalic.otf: /usr/share/fonts/opentype/urw-base35/NimbusSans-Italic.otf: /usr/share/fonts/opentype/urw-base35/NimbusSans-Regular.otf: /usr/share/fonts/opentype/urw-base35/NimbusSansNarrow-Bold.otf: /usr/share/fonts/opentype/urw-base35/NimbusSansNarrow-BoldOblique.otf: /usr/share/fonts/opentype/urw-base35/NimbusSansNarrow-Oblique.otf: /usr/share/fonts/opentype/urw-base35/NimbusSansNarrow-Regular.otf: /usr/share/fonts/opentype/urw-base35/P052-Bold.otf: /usr/share/fonts/opentype/urw-base35/P052-BoldItalic.otf: /usr/share/fonts/opentype/urw-base35/P052-Italic.otf: /usr/share/fonts/opentype/urw-base35/P052-Roman.otf: /usr/share/fonts/opentype/urw-base35/StandardSymbolsPS.otf: /usr/share/fonts/opentype/urw-base35/URWBookman-Demi.otf: /usr/share/fonts/opentype/urw-base35/URWBookman-DemiItalic.otf: /usr/share/fonts/opentype/urw-base35/URWBookman-Light.otf: /usr/share/fonts/opentype/urw-base35/URWBookman-LightItalic.otf: /usr/share/fonts/opentype/urw-base35/URWGothic-Book.otf: /usr/share/fonts/opentype/urw-base35/URWGothic-BookOblique.otf: /usr/share/fonts/opentype/urw-base35/URWGothic-Demi.otf: /usr/share/fonts/opentype/urw-base35/URWGothic-DemiOblique.otf: /usr/share/fonts/opentype/urw-base35/Z003-MediumItalic.otf: /usr/share/fonts/truetype/Gargi/Gargi.ttf: /usr/share/fonts/truetype/Gubbi/Gubbi.ttf: /usr/share/fonts/truetype/Nakula/nakula.ttf: /usr/share/fonts/truetype/Navilu/Navilu.ttf: /usr/share/fonts/truetype/Sahadeva/sahadeva.ttf: /usr/share/fonts/truetype/Sarai/Sarai.ttf: /usr/share/fonts/truetype/abyssinica/AbyssinicaSIL-Regular.ttf: /usr/share/fonts/truetype/ancient-scripts/Symbola_hint.ttf: /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: /usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf: /usr/share/fonts/truetype/fonts-beng-extra/Ani.ttf: /usr/share/fonts/truetype/fonts-beng-extra/JamrulNormal.ttf: /usr/share/fonts/truetype/fonts-beng-extra/LikhanNormal.ttf: /usr/share/fonts/truetype/fonts-beng-extra/MitraMono.ttf: /usr/share/fonts/truetype/fonts-beng-extra/Mukti.ttf: /usr/share/fonts/truetype/fonts-beng-extra/Muktibold.ttf: /usr/share/fonts/truetype/fonts-deva-extra/chandas1-2.ttf: /usr/share/fonts/truetype/fonts-deva-extra/kalimati.ttf: /usr/share/fonts/truetype/fonts-deva-extra/samanata.ttf: /usr/share/fonts/truetype/fonts-gujr-extra/Rekha.ttf: /usr/share/fonts/truetype/fonts-gujr-extra/aakar-medium.ttf: /usr/share/fonts/truetype/fonts-gujr-extra/padmaa-Bold.1.1.ttf: /usr/share/fonts/truetype/fonts-gujr-extra/padmaa-Medium-0.5.ttf: /usr/share/fonts/truetype/fonts-gujr-extra/padmaa.ttf: /usr/share/fonts/truetype/fonts-guru-extra/Saab.ttf: /usr/share/fonts/truetype/fonts-kalapi/Kalapi.ttf: /usr/share/fonts/truetype/fonts-orya-extra/utkal.ttf: /usr/share/fonts/truetype/fonts-telu-extra/Pothana2000.ttf: /usr/share/fonts/truetype/fonts-telu-extra/vemana2000.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Rasa-Bold.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Rasa-Light.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Rasa-Medium.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Rasa-Regular.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Rasa-SemiBold.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-Bold.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-BoldItalic.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-Italic.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-Light.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-LightItalic.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-Medium.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-MediumItalic.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-Regular.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-SemiBold.ttf: /usr/share/fonts/truetype/fonts-yrsa-rasa/Yrsa-SemiBoldItalic.ttf: /usr/share/fonts/truetype/freefont/FreeMono.ttf: /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf: /usr/share/fonts/truetype/freefont/FreeMonoBoldOblique.ttf: /usr/share/fonts/truetype/freefont/FreeMonoOblique.ttf: /usr/share/fonts/truetype/freefont/FreeSans.ttf: /usr/share/fonts/truetype/freefont/FreeSansBold.ttf: /usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf: /usr/share/fonts/truetype/freefont/FreeSansOblique.ttf: /usr/share/fonts/truetype/freefont/FreeSerif.ttf: /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf: /usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf: /usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf: /usr/share/fonts/truetype/gentium-basic/GenBasB.ttf: /usr/share/fonts/truetype/gentium-basic/GenBasBI.ttf: /usr/share/fonts/truetype/gentium-basic/GenBasI.ttf: /usr/share/fonts/truetype/gentium-basic/GenBasR.ttf: /usr/share/fonts/truetype/gentium-basic/GenBkBasB.ttf: /usr/share/fonts/truetype/gentium-basic/GenBkBasBI.ttf: /usr/share/fonts/truetype/gentium-basic/GenBkBasI.ttf: /usr/share/fonts/truetype/gentium-basic/GenBkBasR.ttf: /usr/share/fonts/truetype/gentium/Gentium-I.ttf: /usr/share/fonts/truetype/gentium/Gentium-R.ttf: /usr/share/fonts/truetype/gentium/GentiumAlt-I.ttf: /usr/share/fonts/truetype/gentium/GentiumAlt-R.ttf: /usr/share/fonts/truetype/kacst-one/KacstOne-Bold.ttf: /usr/share/fonts/truetype/kacst-one/KacstOne.ttf: /usr/share/fonts/truetype/kacst/KacstArt.ttf: /usr/share/fonts/truetype/kacst/KacstBook.ttf: /usr/share/fonts/truetype/kacst/KacstDecorative.ttf: /usr/share/fonts/truetype/kacst/KacstDigital.ttf: /usr/share/fonts/truetype/kacst/KacstFarsi.ttf: /usr/share/fonts/truetype/kacst/KacstLetter.ttf: /usr/share/fonts/truetype/kacst/KacstNaskh.ttf: /usr/share/fonts/truetype/kacst/KacstOffice.ttf: /usr/share/fonts/truetype/kacst/KacstPen.ttf: /usr/share/fonts/truetype/kacst/KacstPoster.ttf: /usr/share/fonts/truetype/kacst/KacstQurn.ttf: /usr/share/fonts/truetype/kacst/KacstScreen.ttf: /usr/share/fonts/truetype/kacst/KacstTitle.ttf: /usr/share/fonts/truetype/kacst/KacstTitleL.ttf: /usr/share/fonts/truetype/kacst/mry_KacstQurn.ttf: /usr/share/fonts/truetype/lao/Phetsarath_OT.ttf: /usr/share/fonts/truetype/lato/Lato-Black.ttf: /usr/share/fonts/truetype/lato/Lato-BlackItalic.ttf: /usr/share/fonts/truetype/lato/Lato-Bold.ttf: /usr/share/fonts/truetype/lato/Lato-BoldItalic.ttf: /usr/share/fonts/truetype/lato/Lato-Hairline.ttf: /usr/share/fonts/truetype/lato/Lato-HairlineItalic.ttf: /usr/share/fonts/truetype/lato/Lato-Heavy.ttf: /usr/share/fonts/truetype/lato/Lato-HeavyItalic.ttf: /usr/share/fonts/truetype/lato/Lato-Italic.ttf: /usr/share/fonts/truetype/lato/Lato-Light.ttf: /usr/share/fonts/truetype/lato/Lato-LightItalic.ttf: /usr/share/fonts/truetype/lato/Lato-Medium.ttf: /usr/share/fonts/truetype/lato/Lato-MediumItalic.ttf: /usr/share/fonts/truetype/lato/Lato-Regular.ttf: /usr/share/fonts/truetype/lato/Lato-Semibold.ttf: /usr/share/fonts/truetype/lato/Lato-SemiboldItalic.ttf: /usr/share/fonts/truetype/lato/Lato-Thin.ttf: /usr/share/fonts/truetype/lato/Lato-ThinItalic.ttf: /usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf: /usr/share/fonts/truetype/liberation/LiberationMono-BoldItalic.ttf: /usr/share/fonts/truetype/liberation/LiberationMono-Italic.ttf: /usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf: /usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf: /usr/share/fonts/truetype/liberation/LiberationSans-BoldItalic.ttf: /usr/share/fonts/truetype/liberation/LiberationSans-Italic.ttf: /usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf: /usr/share/fonts/truetype/liberation/LiberationSansNarrow-Bold.ttf: /usr/share/fonts/truetype/liberation/LiberationSansNarrow-BoldItalic.ttf: /usr/share/fonts/truetype/liberation/LiberationSansNarrow-Italic.ttf: /usr/share/fonts/truetype/liberation/LiberationSansNarrow-Regular.ttf: /usr/share/fonts/truetype/liberation/LiberationSerif-Bold.ttf: /usr/share/fonts/truetype/liberation/LiberationSerif-BoldItalic.ttf: /usr/share/fonts/truetype/liberation/LiberationSerif-Italic.ttf: /usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf: /usr/share/fonts/truetype/liberation2/LiberationMono-Bold.ttf: /usr/share/fonts/truetype/liberation2/LiberationMono-BoldItalic.ttf: /usr/share/fonts/truetype/liberation2/LiberationMono-Italic.ttf: /usr/share/fonts/truetype/liberation2/LiberationMono-Regular.ttf: /usr/share/fonts/truetype/liberation2/LiberationSans-Bold.ttf: /usr/share/fonts/truetype/liberation2/LiberationSans-BoldItalic.ttf: /usr/share/fonts/truetype/liberation2/LiberationSans-Italic.ttf: /usr/share/fonts/truetype/liberation2/LiberationSans-Regular.ttf: /usr/share/fonts/truetype/liberation2/LiberationSerif-Bold.ttf: /usr/share/fonts/truetype/liberation2/LiberationSerif-BoldItalic.ttf: /usr/share/fonts/truetype/liberation2/LiberationSerif-Italic.ttf: /usr/share/fonts/truetype/liberation2/LiberationSerif-Regular.ttf: /usr/share/fonts/truetype/libreoffice/opens___.ttf: /usr/share/fonts/truetype/lohit-assamese/Lohit-Assamese.ttf: /usr/share/fonts/truetype/lohit-bengali/Lohit-Bengali.ttf: /usr/share/fonts/truetype/lohit-devanagari/Lohit-Devanagari.ttf: /usr/share/fonts/truetype/lohit-gujarati/Lohit-Gujarati.ttf: /usr/share/fonts/truetype/lohit-kannada/Lohit-Kannada.ttf: /usr/share/fonts/truetype/lohit-malayalam/Lohit-Malayalam.ttf: /usr/share/fonts/truetype/lohit-oriya/Lohit-Odia.ttf: /usr/share/fonts/truetype/lohit-punjabi/Lohit-Gurmukhi.ttf: /usr/share/fonts/truetype/lohit-tamil-classical/Lohit-Tamil-Classical.ttf: /usr/share/fonts/truetype/lohit-tamil/Lohit-Tamil.ttf: /usr/share/fonts/truetype/lohit-telugu/Lohit-Telugu.ttf: /usr/share/fonts/truetype/malayalam/AnjaliOldLipi-Regular.ttf: /usr/share/fonts/truetype/malayalam/Dyuthi-Regular.ttf: /usr/share/fonts/truetype/malayalam/Karumbi-Regular.ttf: /usr/share/fonts/truetype/malayalam/Keraleeyam-Regular.ttf: /usr/share/fonts/truetype/malayalam/Meera-Regular.ttf: /usr/share/fonts/truetype/malayalam/Rachana-Bold.ttf: /usr/share/fonts/truetype/malayalam/Rachana-Regular.ttf: /usr/share/fonts/truetype/malayalam/RaghuMalayalamSans-Regular.ttf: /usr/share/fonts/truetype/malayalam/Suruma.ttf: /usr/share/fonts/truetype/malayalam/Uroob-Regular.ttf: /usr/share/fonts/truetype/migmix/migmix-1m-bold.ttf: ←(追加: migフォント) /usr/share/fonts/truetype/migmix/migmix-1m-regular.ttf: /usr/share/fonts/truetype/migmix/migmix-1p-bold.ttf: /usr/share/fonts/truetype/migmix/migmix-1p-regular.ttf: /usr/share/fonts/truetype/migmix/migmix-2m-bold.ttf: /usr/share/fonts/truetype/migmix/migmix-2m-regular.ttf: /usr/share/fonts/truetype/migmix/migmix-2p-bold.ttf: /usr/share/fonts/truetype/migmix/migmix-2p-regular.ttf: /usr/share/fonts/truetype/migmix/migu-1c-bold.ttf: /usr/share/fonts/truetype/migmix/migu-1c-regular.ttf: /usr/share/fonts/truetype/migmix/migu-1m-bold.ttf: /usr/share/fonts/truetype/migmix/migu-1m-regular.ttf: /usr/share/fonts/truetype/migmix/migu-1p-bold.ttf: /usr/share/fonts/truetype/migmix/migu-1p-regular.ttf: /usr/share/fonts/truetype/migmix/migu-2m-bold.ttf: /usr/share/fonts/truetype/migmix/migu-2m-regular.ttf: /usr/share/fonts/truetype/noto/NotoKufiArabic-Bold.ttf: /usr/share/fonts/truetype/noto/NotoKufiArabic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoLoopedLao-Bold.ttf: /usr/share/fonts/truetype/noto/NotoLoopedLao-Regular.ttf: /usr/share/fonts/truetype/noto/NotoLoopedLaoUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoLoopedLaoUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoLoopedThai-Bold.ttf: /usr/share/fonts/truetype/noto/NotoLoopedThai-Regular.ttf: /usr/share/fonts/truetype/noto/NotoLoopedThaiUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoLoopedThaiUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoMono-Regular.ttf: /usr/share/fonts/truetype/noto/NotoMusic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoNaskhArabic-Bold.ttf: /usr/share/fonts/truetype/noto/NotoNaskhArabic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoNaskhArabicUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoNaskhArabicUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoNastaliqUrdu-Bold.ttf: /usr/share/fonts/truetype/noto/NotoNastaliqUrdu-Regular.ttf: /usr/share/fonts/truetype/noto/NotoRashiHebrew-Bold.ttf: /usr/share/fonts/truetype/noto/NotoRashiHebrew-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSans-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSans-BoldItalic.ttf: /usr/share/fonts/truetype/noto/NotoSans-Italic.ttf: /usr/share/fonts/truetype/noto/NotoSans-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansAdlam-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansAdlam-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansAdlamUnjoined-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansAdlamUnjoined-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansAnatolianHieroglyphs-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansArabic-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansArabic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansArabicUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansArabicUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansArmenian-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansArmenian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansAvestan-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBalinese-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansBalinese-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBamum-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansBamum-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBassaVah-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBatak-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBengali-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansBengali-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBengaliUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansBengaliUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBhaiksuki-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBrahmi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBuginese-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansBuhid-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansCanadianAboriginal-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansCanadianAboriginal-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansCarian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansCaucasianAlbanian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansChakma-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansCham-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansCham-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansCherokee-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansCherokee-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansCoptic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansCuneiform-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansCypriot-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansDeseret-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansDevanagari-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansDevanagari-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansDevanagariUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansDevanagariUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansDisplay-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansDisplay-BoldItalic.ttf: /usr/share/fonts/truetype/noto/NotoSansDisplay-Italic.ttf: /usr/share/fonts/truetype/noto/NotoSansDisplay-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansDuployan-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansEgyptianHieroglyphs-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansElbasan-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansElymaic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansEthiopic-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansEthiopic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGeorgian-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansGeorgian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGlagolitic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGothic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGrantha-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGujarati-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansGujarati-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGujaratiUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansGujaratiUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGunjalaGondi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGurmukhi-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansGurmukhi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansGurmukhiUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansGurmukhiUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansHanifiRohingya-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansHanifiRohingya-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansHanunoo-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansHatran-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansHebrew-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansHebrew-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansImperialAramaic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansIndicSiyaqNumbers-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansInscriptionalPahlavi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansInscriptionalParthian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansJavanese-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansJavanese-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKaithi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKannada-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansKannada-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKannadaUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansKannadaUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKayahLi-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansKayahLi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKharoshthi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKhmer-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansKhmer-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKhmerUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansKhmerUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKhojki-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansKhudawadi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLao-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansLao-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLaoUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansLaoUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLepcha-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLimbu-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLinearA-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLinearB-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLisu-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansLisu-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLycian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansLydian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMahajani-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMalayalam-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansMalayalam-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMalayalamUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansMalayalamUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMandaic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansManichaean-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMarchen-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMasaramGondi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMath-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMayanNumerals-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMedefaidrin-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansMedefaidrin-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMeeteiMayek-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansMeeteiMayek-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMendeKikakui-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMeroitic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMiao-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansModi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMongolian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMono-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansMono-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMro-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMultani-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMyanmar-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansMyanmar-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansMyanmarUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansMyanmarUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansNKo-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansNabataean-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansNewTaiLue-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansNewa-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansNushu-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOgham-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOlChiki-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansOlChiki-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOldHungarian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOldItalic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOldNorthArabian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOldPermic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOldPersian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOldSogdian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOldSouthArabian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOldTurkic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOriya-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansOriya-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOriyaUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansOriyaUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOsage-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansOsmanya-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansPahawhHmong-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansPalmyrene-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansPauCinHau-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansPhagsPa-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansPhoenician-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansPsalterPahlavi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansRejang-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansRunic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSamaritan-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSaurashtra-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSharada-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansShavian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSiddham-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSignWriting-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSinhala-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansSinhala-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSinhalaUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansSinhalaUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSogdian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSoraSompeng-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansSoraSompeng-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSoyombo-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSundanese-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansSundanese-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSylotiNagri-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSymbols-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansSymbols-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSymbols2-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansSyriac-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTagalog-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTagbanwa-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTaiLe-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTaiTham-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansTaiTham-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTaiViet-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTakri-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTamil-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansTamil-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTamilSupplement-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTamilUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansTamilUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTelugu-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansTelugu-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTeluguUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansTeluguUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansThaana-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansThaana-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansThai-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansThai-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansThaiUI-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSansThaiUI-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinagh-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghAPT-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghAdrar-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghAgrawImazighen-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghAhaggar-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghAir-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghAzawagh-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghGhat-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghHawad-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghRhissaIxa-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghSIL-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTifinaghTawellemmet-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansTirhuta-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansUgaritic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansVai-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansWancho-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansWarangCiti-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansYi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSansZanabazarSquare-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerif-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerif-BoldItalic.ttf: /usr/share/fonts/truetype/noto/NotoSerif-Italic.ttf: /usr/share/fonts/truetype/noto/NotoSerif-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifAhom-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifArmenian-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifArmenian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifBalinese-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifBengali-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifBengali-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifDevanagari-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifDevanagari-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifDisplay-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifDisplay-BoldItalic.ttf: /usr/share/fonts/truetype/noto/NotoSerifDisplay-Italic.ttf: /usr/share/fonts/truetype/noto/NotoSerifDisplay-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifDogra-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifEthiopic-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifEthiopic-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifGeorgian-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifGeorgian-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifGrantha-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifGujarati-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifGujarati-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifGurmukhi-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifGurmukhi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifHebrew-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifHebrew-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifKannada-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifKannada-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifKhmer-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifKhmer-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifKhojki-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifKhojki-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifLao-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifLao-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifMalayalam-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifMalayalam-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifMyanmar-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifMyanmar-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifNyiakengPuachueHmong-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifNyiakengPuachueHmong-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifSinhala-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifTamil-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifTamil-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifTamilSlanted-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifTamilSlanted-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifTangut-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifTelugu-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifTelugu-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifThai-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifThai-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifTibetan-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifTibetan-Regular.ttf: /usr/share/fonts/truetype/noto/NotoSerifYezidi-Bold.ttf: /usr/share/fonts/truetype/noto/NotoSerifYezidi-Regular.ttf: /usr/share/fonts/truetype/noto/NotoTraditionalNushu-Regular.ttf: /usr/share/fonts/truetype/padauk/Padauk-Bold.ttf: /usr/share/fonts/truetype/padauk/Padauk-Regular.ttf: /usr/share/fonts/truetype/padauk/PadaukBook-Bold.ttf: /usr/share/fonts/truetype/padauk/PadaukBook-Regular.ttf: /usr/share/fonts/truetype/pagul/Pagul.ttf: /usr/share/fonts/truetype/samyak-fonts/Samyak-Gujarati.ttf: /usr/share/fonts/truetype/samyak-fonts/Samyak-Malayalam.ttf: /usr/share/fonts/truetype/samyak-fonts/Samyak-Tamil.ttf: /usr/share/fonts/truetype/samyak/Samyak-Devanagari.ttf: /usr/share/fonts/truetype/sinhala/lklug.ttf: /usr/share/fonts/truetype/teluguvijayam/Gidugu.ttf: /usr/share/fonts/truetype/teluguvijayam/Gurajada.ttf: /usr/share/fonts/truetype/teluguvijayam/LakkiReddy.ttf: /usr/share/fonts/truetype/teluguvijayam/Mandali-Regular.ttf: /usr/share/fonts/truetype/teluguvijayam/NATS.ttf: /usr/share/fonts/truetype/teluguvijayam/NTR.ttf: /usr/share/fonts/truetype/teluguvijayam/Peddana-Regular.ttf: /usr/share/fonts/truetype/teluguvijayam/Ponnala.ttf: /usr/share/fonts/truetype/teluguvijayam/PottiSreeramulu.ttf: /usr/share/fonts/truetype/teluguvijayam/Ramaraja-Regular.ttf: /usr/share/fonts/truetype/teluguvijayam/RaviPrakash.ttf: /usr/share/fonts/truetype/teluguvijayam/SreeKrushnadevaraya.ttf: /usr/share/fonts/truetype/teluguvijayam/Suravaram.ttf: /usr/share/fonts/truetype/teluguvijayam/SyamalaRamana.ttf: /usr/share/fonts/truetype/teluguvijayam/TenaliRamakrishna-Regular.ttf: /usr/share/fonts/truetype/teluguvijayam/TimmanaRegular.ttf: /usr/share/fonts/truetype/teluguvijayam/dhurjati.ttf: /usr/share/fonts/truetype/teluguvijayam/mallanna.ttf: /usr/share/fonts/truetype/teluguvijayam/ramabhadra.ttf: /usr/share/fonts/truetype/teluguvijayam/suranna.ttf: /usr/share/fonts/truetype/tibetan-machine/TibetanMachineUni.ttf: /usr/share/fonts/truetype/tlwg/Garuda-Bold.ttf: /usr/share/fonts/truetype/tlwg/Garuda-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/Garuda-Oblique.ttf: /usr/share/fonts/truetype/tlwg/Garuda.ttf: /usr/share/fonts/truetype/tlwg/Kinnari-Bold.ttf: /usr/share/fonts/truetype/tlwg/Kinnari-BoldItalic.ttf: /usr/share/fonts/truetype/tlwg/Kinnari-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/Kinnari-Italic.ttf: /usr/share/fonts/truetype/tlwg/Kinnari-Oblique.ttf: /usr/share/fonts/truetype/tlwg/Kinnari.ttf: /usr/share/fonts/truetype/tlwg/Laksaman-Bold.ttf: /usr/share/fonts/truetype/tlwg/Laksaman-BoldItalic.ttf: /usr/share/fonts/truetype/tlwg/Laksaman-Italic.ttf: /usr/share/fonts/truetype/tlwg/Laksaman.ttf: /usr/share/fonts/truetype/tlwg/Loma-Bold.ttf: /usr/share/fonts/truetype/tlwg/Loma-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/Loma-Oblique.ttf: /usr/share/fonts/truetype/tlwg/Loma.ttf: /usr/share/fonts/truetype/tlwg/Norasi-Bold.ttf: /usr/share/fonts/truetype/tlwg/Norasi-BoldItalic.ttf: /usr/share/fonts/truetype/tlwg/Norasi-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/Norasi-Italic.ttf: /usr/share/fonts/truetype/tlwg/Norasi-Oblique.ttf: /usr/share/fonts/truetype/tlwg/Norasi.ttf: /usr/share/fonts/truetype/tlwg/Purisa-Bold.ttf: /usr/share/fonts/truetype/tlwg/Purisa-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/Purisa-Oblique.ttf: /usr/share/fonts/truetype/tlwg/Purisa.ttf: /usr/share/fonts/truetype/tlwg/Sawasdee-Bold.ttf: /usr/share/fonts/truetype/tlwg/Sawasdee-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/Sawasdee-Oblique.ttf: /usr/share/fonts/truetype/tlwg/Sawasdee.ttf: /usr/share/fonts/truetype/tlwg/TlwgMono-Bold.ttf: /usr/share/fonts/truetype/tlwg/TlwgMono-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/TlwgMono-Oblique.ttf: /usr/share/fonts/truetype/tlwg/TlwgMono.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypewriter-Bold.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypewriter-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypewriter-Oblique.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypewriter.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypist-Bold.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypist-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypist-Oblique.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypist.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypo-Bold.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypo-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypo-Oblique.ttf: /usr/share/fonts/truetype/tlwg/TlwgTypo.ttf: /usr/share/fonts/truetype/tlwg/Umpush-Bold.ttf: /usr/share/fonts/truetype/tlwg/Umpush-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/Umpush-Light.ttf: /usr/share/fonts/truetype/tlwg/Umpush-LightOblique.ttf: /usr/share/fonts/truetype/tlwg/Umpush-Oblique.ttf: /usr/share/fonts/truetype/tlwg/Umpush.ttf: /usr/share/fonts/truetype/tlwg/Waree-Bold.ttf: /usr/share/fonts/truetype/tlwg/Waree-BoldOblique.ttf: /usr/share/fonts/truetype/tlwg/Waree-Oblique.ttf: /usr/share/fonts/truetype/tlwg/Waree.ttf: /usr/share/fonts/truetype/ttf-khmeros-core/KhmerOS.ttf: /usr/share/fonts/truetype/ttf-khmeros-core/KhmerOSsys.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-B.ttf: ←(Ubuntu のフォント) /usr/share/fonts/truetype/ubuntu/Ubuntu-BI.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-C.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-L.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-LI.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-M.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-MI.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-RI.ttf: /usr/share/fonts/truetype/ubuntu/Ubuntu-Th.ttf: /usr/share/fonts/truetype/ubuntu/UbuntuMono-B.ttf: /usr/share/fonts/truetype/ubuntu/UbuntuMono-BI.ttf: /usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf: /usr/share/fonts/truetype/ubuntu/UbuntuMono-RI.ttf: /usr/share/fonts/type1/urw-base35/C059-BdIta.t1: /usr/share/fonts/type1/urw-base35/C059-Bold.t1: /usr/share/fonts/type1/urw-base35/C059-Italic.t1: /usr/share/fonts/type1/urw-base35/C059-Roman.t1: /usr/share/fonts/type1/urw-base35/D050000L.t1: /usr/share/fonts/type1/urw-base35/NimbusMonoPS-Bold.t1: /usr/share/fonts/type1/urw-base35/NimbusMonoPS-BoldItalic.t1: /usr/share/fonts/type1/urw-base35/NimbusMonoPS-Italic.t1: /usr/share/fonts/type1/urw-base35/NimbusMonoPS-Regular.t1: /usr/share/fonts/type1/urw-base35/NimbusRoman-Bold.t1: /usr/share/fonts/type1/urw-base35/NimbusRoman-BoldItalic.t1: /usr/share/fonts/type1/urw-base35/NimbusRoman-Italic.t1: /usr/share/fonts/type1/urw-base35/NimbusRoman-Regular.t1: /usr/share/fonts/type1/urw-base35/NimbusSans-Bold.t1: /usr/share/fonts/type1/urw-base35/NimbusSans-BoldItalic.t1: /usr/share/fonts/type1/urw-base35/NimbusSans-Italic.t1: /usr/share/fonts/type1/urw-base35/NimbusSans-Regular.t1: /usr/share/fonts/type1/urw-base35/NimbusSansNarrow-Bold.t1: /usr/share/fonts/type1/urw-base35/NimbusSansNarrow-BoldOblique.t1: /usr/share/fonts/type1/urw-base35/NimbusSansNarrow-Oblique.t1: /usr/share/fonts/type1/urw-base35/NimbusSansNarrow-Regular.t1: /usr/share/fonts/type1/urw-base35/P052-Bold.t1: /usr/share/fonts/type1/urw-base35/P052-BoldItalic.t1: /usr/share/fonts/type1/urw-base35/P052-Italic.t1: /usr/share/fonts/type1/urw-base35/P052-Roman.t1: /usr/share/fonts/type1/urw-base35/StandardSymbolsPS.t1: /usr/share/fonts/type1/urw-base35/URWBookman-Demi.t1: /usr/share/fonts/type1/urw-base35/URWBookman-DemiItalic.t1: /usr/share/fonts/type1/urw-base35/URWBookman-Light.t1: /usr/share/fonts/type1/urw-base35/URWBookman-LightItalic.t1: /usr/share/fonts/type1/urw-base35/URWGothic-Book.t1: /usr/share/fonts/type1/urw-base35/URWGothic-BookOblique.t1: /usr/share/fonts/type1/urw-base35/URWGothic-Demi.t1: /usr/share/fonts/type1/urw-base35/URWGothic-DemiOblique.t1: /usr/share/fonts/type1/urw-base35/Z003-MediumItalic.t1:
-
フォントの設定ファイル:
$ cat /etc/fonts/fonts.conf
コメント部の抜粋:
和訳:
このファイルは編集しないでください。 これは、FONTCONFIG が更新されると置き換えられます。 ローカルの変更は「local.conf」にあります。 このファイルが参照する local.conf にローカルのカスタマイズを配置します。
-
Xorg が利用しているフォントパスを確認:
$ grep /fonts /var/log/Xorg.0.log : [ 8.237] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist. [ 8.237] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist. [ 8.237] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist. [ 8.238] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist. [ 8.238] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist. /usr/share/fonts/X11/misc, /usr/share/fonts/X11/Type1,
→Fontconfig と違い、Xorg は「/usr/share/fonts/」ディレクトリを再帰的に調べないことに注意
-
$ ls -1 /usr/share/fonts/ : X11 cMap cmap opentype truetype type1
-
参考:
-
抜粋:
Fontconfig は全ての設定を一つの中心ファイル (/etc/fonts/fonts.conf) に集めます。
このファイルは fontconfig がアップデートしたときに置き換えられるので編集してはいけません。
Fontconfig に対応したアプリケーションはこのファイルを読み込んで利用できるフォントとレンダリング方法を知ります。
-
このファイルは、全体的な設定 (/etc/fonts/local.conf) と /etc/fonts/conf.d/ の設定済みプリセット、そしてユーザの設定ファイル ($XDG_CONFIG_HOME/fontconfig/fonts.conf) に書かれたルールの寄せ集めです。
fc-cache を使うことで fontconfig の設定をリビルドできます、ただし変更は新しく起動したアプリケーションにのみ適用されます。
-
Fontconfig の設定ファイルは XML 形式で、以下のヘッダーが必要になります:
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- settings go here --> </fontconfig>
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ---
13. 参考: 「WSL」コマンドのヘルプ:
-
PS C:\Users\user> wsl --help
Copyright (c) Microsoft Corporation. All rights reserved. この製品のプライバシー情報については、https://aka.ms/privacy にアクセスしてください。 使用法: wsl.exe [Argument] [Options...] [CommandLine] Linux バイナリを実行するための引数: コマンド ラインが指定されていない場合、wsl.exe によって既定のシェルが起動されます。 --exec, -e <CommandLine> 既定の Linux シェルを使用せずに、指定されたコマンドを実行します。 --shell-type <Type> 指定したシェルの種類で、指定されたコマンドを実行します。 種類: standard 既定の Linux シェルを使用して、指定されたコマンドを実行します。 login 既定の Linux シェルをログイン シェルとして使用して、指定されたコマンドを実行します。 none 既定の Linux シェルを使用せずに、指定されたコマンドを実行します。 -- 残りのコマンド ラインをそのまま渡します。 オプション: --cd <Directory> 指定されたディレクトリを現在の作業ディレクトリとして設定します。 ~ が使用されている場合、Linux ユーザーのホーム パスが使用されます。パスの先頭が / 文字の場合、Linux の絶対パスとして解釈されます。 それ以外の場合、値は Windows の絶対パスにする必要があります。 --distribution, -d <Distro> 指定されたディストリビューションを実行します。 --user, -u <UserName> 指定されたユーザーとして実行します。 --system システム ディストリビューションのシェルを起動します。 Linux 用 Windows サブシステムを管理するための引数: --help 使用法に関する情報を表示します。 --debug-shell 診断目的で WSL2 デバッグ シェルを開きます。 --install [Distro] [Options...] Linux 用 Windows サブシステム ディストリビューションをインストールします。 有効なディストリビューションの一覧を表示するには、'wsl.exe --list --online' を使用してください。 オプション: --no-launch, -n インストール後にディストリビューションを起動しません。 --web-download Microsoft Store ではなくインターネットからディストリビューションをダウンロードします。 --mount <Disk> すべての WSL 2 ディストリビューションで物理ディスクまたは仮想ディスクをアタッチしてマウントします。 オプション: --vhd <Disk> が仮想ハード ディスクであることを指定します。 --bare ディスクを WSL2 にアタッチしますが、マウントはしません。 --name <Name> マウント時のカスタム名を使用してディスクをマウントします。 --type <Type> ディスクのマウント時に使用するファイル システム。指定しない場合は、既定で ext4 になります。 --options <Options> 追加のマウント オプション。 --partition <Index> マウントするパーティションのインデックス。指定しない場合は、既定でディスク全体になります。 --set-default-version <Version> 新しいディストリビューションの既定のインストール バージョンを変更します。 --shutdown 実行されているすべてのディストリビューションと WSL 2 軽量ユーティリティ仮想マシンを直ちに終了します。 --status Linux 用 Windows サブシステムの状態を表示します。 --unmount [Disk] すべての WSL2 ディストリビューションからディスクのマウント解除とデタッチを行います。 引数なしで呼び出した場合は、すべてのディスクのマウント解除とデタッチが行われます。 --update Linux 用 Windows サブシステム パッケージを更新します。 オプション: --web-download Microsoft Store ではなくインターネットから更新プログラムをダウンロードします。 --pre-release 利用可能な場合は、プレリリース バージョンをダウンロードします。暗黙的に --web-download となります。 --version, -v バージョン情報を表示します。 Linux 用 Windows サブシステムでディストリビューションを管理するための引数: --export <Distro> <FileName> [Options] ディストリビューションを tar ファイルにエクスポートします。 ファイル名を - にすると標準出力になります。 オプション: --vhd ディストリビューションを .vhdx ファイルとしてエクスポートする必要があることを指定します。 --import <Distro> <InstallLocation> <FileName> [Options] 指定された tar ファイルを新しいディストリビューションとしてインポートします。 ファイル名を - にすると標準入力になります。 オプション: --version <Version> 新しいディストリビューションに使用するバージョンを指定します。 --vhd 指定されたファイルが tar ファイルではなく .vhdx ファイルであることを指定します。 この操作により、指定されたインストール場所に .vhdx ファイルのコピーが作成されます。 --import-in-place <Distro> <FileName> 指定された .vhdx ファイルを新しいディストリビューションとしてインポートします。 この仮想ハード ディスクは ext4 ファイル システムの種類でフォーマットする必要があります。 --list, -l [Options] ディストリビューションを一覧表示します。 オプション: --all 現在インストールまたはアンインストール中のディストリビューションを含む すべてのディストリビューションを一覧表示します。 --running 現在実行中のディストリビューションのみを一覧表示します。 --quiet, -q ディストリビューションの名前のみを表示します。 --verbose, -v すべてのディストリビューションに関する詳細情報を表示します。 --online, -o 'wsl.exe --install' を使用してインストールできるディストリビューションの一覧を表示します。 --set-default, -s <Distro> ディストリビューションを既定として設定します。 --set-version <Distro> <Version> 指定されたディストリビューションのバージョンを変更します。 --terminate, -t <Distro> 指定されたディストリビューションを終了します。 --unregister <Distro> ディストリビューションの登録を解除し、ルート ファイル システムを削除します。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----
14. 参考: WSL ディストリビューションのその他の操作:
-
参考:
-
1). WSL を更新:
PS C:\Users\user> wsl --update
-
2). WSL の状態を確認:
PS C:\Users\user> wsl --status
-
3). WSL のバージョンを確認:
PS C:\Users\user> wsl --version
-
4). ヘルプ コマンド:
PS C:\Users\user> wsl --help
-
5). 指定した「Linux」の停止:
PS C:\Users\user> wsl -t ubuntu
-
6). 「WSL2」(Linux) のシャットダウン:
(すべての「Linux」の停止)
PS C:\Users\user> wsl --shutdown
-
7). 「Windows11」の再起動:
コマンドの実行には、管理者権限が必要です:
「Windows」を右クリック→ターミナル(管理者)
ターミナル(管理者)の確認:
PS C:\Users\user> get-tpm
-
実行:
PS C:\Users\user> Restart-Computer
-
8). 「Windows11」の電源オフ:
コマンドの実行には、管理者権限が必要です:
「Windows」を右クリック→ターミナル(管理者)
ターミナル(管理者)の確認:
PS C:\Users\user> get-tpm
-
実行:
PS C:\Users\user> Stop-Computer
-
9). 「Windows ターミナル」で、Linux のコマンドを実行:
PS C:\Users\user> wsl ls -la
→Linux の「ls -la」コマンドが使えます。
-
10). 「Windows ターミナル」で、直接 Windows ツールを実行: <ツール名>.exe
PS C:\Users\user> notepad.exe
→起動できるプログラムは限定されます。(.exe は無くてもOK)
-
個人でインストールしたプログラムを実行するときは、
Windows+R で、「Notepad++.exe C:\Users\user\Desktop\test2.ps1
」Enter
-
11). コマンドで、管理者権限の「PowerShell」を起動:
PS C:\Users\user> Start-Process powershell -verb runas
→新しい管理者権限のウィンドウが開きます。
-
背景が「青色」でわかりやすいです。
デフォルトのフォントは「MS ゴシック」で粗いので、変更したい時は、タイトルバーで右クリック →プロパティ →「フォント」タブ
個人的には、「Migu 1M 」がオススメ
-
12). 「スクリプト」(.ps1) で、管理者権限に変更:
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("Administrators")) { Start-Process powershell.exe "-File `"$PSCommandPath`"" -Verb RunAs; exit }
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- -----
15. 参考: 追加の Linux ディストリビューションをインストールする場合:
-
参考:
-
PS C:\Users\user> wsl --install <Distribution Name>
インストールの流れ:
オプションの WSL および仮想マシン プラットフォームのコンポーネントを有効にします
最新の Linux カーネルをダウンロードしてインストールします
WSL 2 を既定値として設定します
Ubuntu Linux ディストリビューションをダウンロードしてインストールします (再起動が必要になる場合があります)
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- --
16. 参考: 「Windows11」と「WSL2」で、データの共有をするには:
-
「WSL2」に、「VirtualBox」や「Boxes」などにある「クリップボードの共有」機能はないようです。 運用で工夫しました。
-
「Windows11」のデスクトップ上で、「Ubuntu」で使っている「featherpad」等のエディタのウィンドウが開けるようになりました。
-
1). 惜しいかな、「Windows11」と「WSL2」のアプリ間で、テキストの貼付けができません。
-
2). Windows11 の「エクスプローラ」で、Ubuntu 側のファイルシステムは「ネットワーク」の「Linux」フォルダとしてアクセスできます。
-
3). Windows11 にインストールした「notepad++」にて、Linux 側にあるテキストファイルを開いて、編集できます:
-
(1). Linux 側のファイルを開いているところ:
-
(2). Linux 側のファイルを開いたところ:
ウィンドウ下のステータスバーに注目:
-
(3). タイトルバーの拡大:
→ファイルマネージャでアドレスを使う時は、行末のアプリ名の「- Notepad++」は削除
-
→「Windows ターミナル」で「Ubuntu」タブを開いておかなくても、アクセスできました。
つまり、WSL2 での「Ubuntu」のインストールで、マウント状態が保持されるようです。
-
「notepad++」は Linux のテキストファイルに対応しています。
→フォントは「Not Sans CJK」に変更
-
4). Windows11 側のファイルシステムは、Ubuntu に「マウント」されており、アクセスできます。
Windows11 のテキストエディタで作成したテキストファイルは、Linux 側のテキストエディタで編集しないのが無難ですが、
「notepad++ 」をインストールすれば回避できます。
設定で、新規ファイルが「UTF-8」で「LF」を使うようにして、その後、すべてのテキストファイルを作成し直しておけば、Linux 側のテキストエディタで編集できます。
-
5). 例えば、「Windows11」の「firefox」ブラウザで、ブログ記事の一部をコピー、それを「WSL2」の「Ubuntu」の「featherpad」に貼付けると、貼付け出来ませんでした。
当然ですが、「WSL2」の「Ubuntu」の「firefox」ブラウザで開いたブログ記事であれば、「featherpad」に貼付けできます。
→両方に「ブラウザ」があれば(インストールすれば)、「ブラウザ」(ブログの編集画面等)経由で「データの共有」ができます。
-
6). ちなみに、Gメールの「下書き」もデータの共有に使えます。
こちらは「テキスト」だけでなく、画像ファイル等を添付して利用できます。
自分のメールアドレス宛に下書きを作成(送信しません)して、別のPC でその下書きを開けば、「データの共有」ができます。添付ファイルのダウンロードやテキストの貼り付けが済んだら、ゴミ箱アイコンをクリック。むだに容量を使わないのが利点です。
-
7). 「Windows11」のエクスプローラでの「zip」圧縮は注意が必要です:
-
いつもは、「Windows+PrintScreen」で「スクリーンショット」を直接ファイルに保存しています:
→全画面のスクリーンショットが「ペイント」アプリを起動しなくても、「ピクチャ」の「スクリーンショット」フォルダにファイルとして保存でき手間がかかりません。(「Windows」ではクリップボードへの保存がデフォルト)
-
例:ファイル名に日本語の「スクリーンショット」が含まれます:
-
「Snipping Tool」でも保存できますが、少し面倒:
「Windows + Shift + S」→「Snipping Tool」起動→「Tab」を4回(全画面の指定)→Enter
-
例:ファイル名に日本語の「スクリーンショット」が含まれます:
C:\Users(ユーザー名)\Pictures\Screenshots\スクリーンショット 2023-03-23 092233.png
途中で、保存するファイル名を変更できますが、保存のたびに行うことになるので面倒です。
-
ここで、別のLinux PC に画像ファイルを送る時は、いくつかのファイルをフォルダにまとめて、右クリックで「圧縮…」→ZIPファイルを作成 して、メールに添付してます。
-
注意: 画像のファイル名が日本語だと、Linux 側で受け取り、解凍すると、ファイル名が文字化けします。
→「Windows11」では文字コードとして「シフトJIS」が、Linux では「UTF-8」が使われています。
-
→上段の画像は、「Windows11」の「エクスプローラ」でzip 圧縮、Linux でメールで受取り、解凍したら、文字化けしているところです。
下段の画像は、Linux 側の「ファイルマネージャ」で「zip」圧縮、Linux でメールで受取り、解凍したものです。 文字化けしていません。
-
8). zip 圧縮時の文字化けの回避:
-
(1). Linux 側に「ファイルマネージャ 」をインストール:
-
(2). Linux の「ファイルマネージャ」にて、「Windows11」の画像フォルダにアクセス:
「C:\Users(ユーザー名)\Pictures\Screenshots」:
-
(3). ひとつのフォルダに集めて「zip」圧縮:
→今回は「w4」フォルダに集めて、右クリックで「zip」圧縮し、「w4.zip」を作成する予定
-
(4). ブラウザを開き、Gメールの「下書き」を作成し、「w4.zip」を添付:
(5). 別のLinux PC にて、メールの「下書き」を開きます:
-
(6). 添付ファイルを開き、それを解凍:
→文字化けは発生しません:
-
-
→ZIP 作成を「Windows11」側で行うのか、「Ubuntu」側で行うかの違いです。
-
ちなみに、「Windows11」のスクリーンショットの「ファイル名」を英語に変更するやり方は見当たりません。
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----
17. 参考: 「Windows11」の日本語のフォルダ名を英語に変更:
-
「Windows11」のスクリーンショットの「ファイル名」を英語に変更できないかトライしました。
-
例:
-
親フォルダを英語にすれば、スクリーンショットの「ファイル名」が英語になるかもしれません。
少しは可能性があるのでトライしますが、画像をキャプチャするアプリでの設定が必要な気がします。
それができなくても、Linux からコマンドでアクセスしやすくできそう。
-
1). 「Windows ターミナル」で確認:
PS C:\Users\user> ls -Name : .ms-ad .vscode 3D Objects Apple Contacts Desktop Documents Downloads Favorites iCloudDrive Links Music OneDrive Pictures Saved Games Searches Shared with me SynologyDrive Videos
→一覧で見ると「英語」なので、GUI で「どう表示されるか」だけの気がします。
-
2). 各フォルダごとに英語のフォルダ名に変更します:
-
「Windows11」で使われている「日本語」のフォルダ名:
デスクトップ →Desktop
ダウンロード →Downloads
ドキュメント →Documents
ミュージック →Music
ビデオ →Videos
ピクチャ →Pictures
スクリーンショット → Screenshots-
リンク →Links
検索 →Searches
アドレス帳 →Contacts
お気に入り →Favorites
保存したゲーム →Saved Games
3D オブジェクト →3D Objects
→英語のファイル名を覚える必要はありません。
「日本語のフォルダ名を使うか、使わないか」の設定なので、英語にしたいフォルダのみ変更します。
-
3). エクスプローラを開きます:
-
「横3点」ボタン→「オプション」→
「フォルダオプション」画面→「表示」タブ
-
(1). 「隠しファイル、隠しフォルダー、および隠しドライブを表示する] をチェック
-
(2). 「保護されたオペレーティングシステムファイルを表示しない(推奨)] のチェックを外します
-
→「適用」
-
警告のダイアログボックスが表示:
→「はい」
→「OK」
-
4). 英語にしたい「日本語」のフォルダを開き、「desktop.ini」、または「desktop」ファイルを右クリック→「プログラムから開く」→「メモ帳」
-
ファイルを修正:
LocalizedResourceName …
↓ 行頭に「;
」を追記して、コメント行に変更:
;LocalizedResourceName …
→保存
-
5). 「ピクチャ」フォルダの下の「スクリーンショット」フォルダも忘れずに、「desktop.ini」ファイルを修正します。
-
6). 「Windows11」を再起動:
-
7). エクスプローラを開き、確認:
すべてではなく、主なフォルダのみ修正しました。
-
8). Windows + PrintScreen で、スクリーンショットを保存して、ファイル名を確認:
フォルダ名は英語になりましたが、ファイル名は以前と変わっていません:
→最後のファイルは、 「Windows + Shift + S」で、「Snipping Tool」を起動して、全画面を保存してみました。
どれも「日本語」が含まれたファイル名のままです。失敗だけど、これはこれで良いかな。
-
9). エクスプローラの設定を元に戻します:
-
「横3点」ボタン→「オプション」→
「フォルダオプション」画面→「表示」タブ
-
(1). 「規定値の戻す」をクリック
→「適用」
-
(2). 「「登録されている拡張子は表示しない」のチェックを外します
→「適用」
→「OK」
-
注意: 大きな Windows Update があると、元の「日本語」のフォルダ名に戻ってしまう可能性があります:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ---
18. 参考: 「WSL2」で「クリップボードの共有」機能を有効化:
-
「WSL2」に、「VirtualBox」や「Boxes」などにある「クリップボードの共有」機能が見当たらないので、使えるようにトライしました:
-
1). 「Ubuntu」で確認:
$ apt list spice-vdagent : spice-vdagent/jammy,now 0.22.1-1 amd64
-
2). 「Ubuntu」でインストール:
$ sudo apt install spice-vdagent : 以下のパッケージが新たにインストールされます: spice-vdagent
-
3). 「~/.bash_profile」の修正:
$ nano ~/.bash_profile
-
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" sleep 1; fcitx-autostart
↓ 途中に追加:
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" spice-vdagent & sleep 1; fcitx-autostart
Ctrl+S で上書き保存
Ctrl+X で終了
-
4). PC を再起動:
→「Windows11」まで再起動するのがポイントです。
-
5). 動作確認:
「Windows11」と「WSL2」のアプリ間で、テキストの貼付けが相互にできるか確認。
→OK
-
-
まとめ
「Windows11」にて、「WSL2」コマンドで、「Ubuntu 22.04.2 LTS」をインストールしてみました。
-
「Window11」のメニューからアプリ単体のウィンドウを起動できるので、 使いたかった Linux アプリ(例えば、featherpad)が「Window11」のデスクトップで使えます。
便利な機能ですが、Linux デスクトップ環境がないとうまく動かないアプリもあるので、すべてが使えるとは限りません。Linux デスクトップ環境を使うなら、「VirtualBox」が無難です。
ただし、「WSL2」は「VirtualBox」とは相性が良くない(CPU の仮想化の機能を奪い合うので、パフォーマンスが低下する)ようです。どちらを選ぶかは、PC の性能になりそう。
-
ちなみに、一度に使う Linux アプリは 2つまでにしています。また、Linux で使うフォントも多すぎるので厳選して減らした方が良いかも。
-
また、下記のコマンドを使う時は注意:
PS C:\Users\user> wsl -t ubuntu
例えば、複数の Linux アプリを使っているときに、ひとつが固まったので、上記のコマンドを投入すると、 すべての(指定した Ubuntu の) Linux アプリがいきなり閉じます。
-
-
-
-
-
目次
-
-
- 目次
- - --- - --- - --- - --- - --- - --- - --- - --- - -
- 「Windows11」(22H2) を起動:
- - --- - --- - --- - --- - --- - --- - --- - --- - --
- 「Ubuntu」について:
- - --- - --- - --- - --- - --- - --- - --- - --- - ---
- 「WSL 2」について:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----
- 1.「WSL 2」で「Ubuntu」をインストール:
- 1). 「Windows11」で、管理者権限で「PowerShell」を起動:
- 2). インストールできる「Linux ディストリビューション」の一覧を表示:
- 3). 「Windows11」で、WSL2 をインストール:
- 4). 参考: インストール中の表示:
- 5). ターミナルを右上の「x」で閉じました。
- 6). 指示に従い、「Windows11」を再起動:
- 7). 自動的に「ターミナル」が立ち上がり、「Ubuntu」タブが開きました:
- 8). ユーザ名/パスワードを設定:
- 9). コンピュータ名が自動的にシステムの情報を使って設定されました。
- 10). 「Ubuntu」が利用可能になりました:
- - --- - --- - --- - --- - --- - --- - --- - --- - -----
- 2. 参考:「Windows ターミナル」の起動のやり方:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- -
- 3. 参考:「Ubuntu」の起動のやり方:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- --
- 4. 参考:「Ubuntu」を起動したときの情報について:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ---
- 5. 参考:「Ubuntu」の再起動のやり方:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----
- 6.「WSL 2」の「Ubuntu」でシステム更新:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- -----
- 7. 「WSL 2」の「Ubuntu」で標準で使える日本語フォント:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- -
- 7-1. 「Windows11」側に、フォントをインストール:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- --
- 7-2.「Windows 11」側のフォントを「Ubuntu」で使えるように設定:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ---
- 7-3. Ubuntu 側に、日本語フォント「fonts-noto-cjk」をインストール:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----
- 8.「Ubuntu」のロケールを日本語(ja_JP)に変更:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- -----
- 9.「Ubuntu」によく使うアプリをインストール:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- -
- 9-1. 任意: ターミナルの「xfce4-terminal」をインストール:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- --
- 9-2. 任意:「Ubuntu」の「ファイルマネージャ」をインストール:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ---
- 9-3. 任意:「Ubuntu」のデフォルトのテキストエディタ「gedit」をインストール:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----
- 9-4. 任意:「Ubuntu」に、テキストエディタの「Featherpad」をインストール:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- -
- 9-5. 任意:「Ubuntu」に、ESR 版の「Firefox」をインストール:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- -----
- 10.「WSL2」での日本語入力:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- -
- 10-1.「WSL2」の「Windows ターミナル」を使って、Ubuntu の「CUI アプリ」で日本語入力:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- --
- 10-2.「Ubuntu」のターミナル「xfce4-terminal」を使って、「CUI アプリ」で日本語入力:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ---
- 10-3.「WSL2」の「GUI アプリ」で、日本語入力:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----
- 11. 「fcitx-mozc」で日本語入力:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- -----
- 11-1. 日本語入力のキー割当を別々のキーに変更:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- -
- 11-2. 参考: 「Windows11」の「IME」の設定方法:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- --
- 12. 参考: 「Xubuntu 22.0.2 LTS」で使っている「fonts」:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ---
- 13. 参考: 「WSL」コマンドのヘルプ:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----
- 14. 参考: WSL ディストリビューションのその他の操作:
- 1). WSL を更新:
- 2). WSL の状態を確認:
- 3). WSL のバージョンを確認:
- 4). ヘルプ コマンド:
- 5). 指定した「Linux」の停止:
- 6). 「WSL2」(Linux) のシャットダウン:
- 7). 「Windows11」の再起動:
- 8). 「Windows11」の電源オフ:
- 9). 「Windows ターミナル」で、Linux のコマンドを実行:
- 10). 「Windows ターミナル」で、直接 Windows ツールを実行: <ツール名>.exe
- 11). コマンドで、管理者権限の「PowerShell」を起動:
- 12). 「スクリプト」(.ps1) で、管理者権限に変更:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- -----
- 15. 参考: 追加の Linux ディストリビューションをインストールする場合:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- --
- 16. 参考: 「Windows11」と「WSL2」で、データの共有をするには:
- 1). 惜しいかな、「Windows11」と「WSL2」のアプリ間で、テキストの貼付けができません。
- 2). Windows11 の「エクスプローラ」で、Ubuntu 側のファイルシステムは「ネットワーク」の「Linux」フォルダとしてアクセスできます。
- 3). Windows11 にインストールした「notepad++」にて、Linux 側にあるテキストファイルを開いて、編集できます:
- 4). Windows11 側のファイルシステムは、Ubuntu に「マウント」されており、アクセスできます。
- 5). 例えば、「Windows11」の「firefox」ブラウザで、ブログ記事の一部をコピー、それを「WSL2」の「Ubuntu」の「featherpad」に貼付けると、貼付け出来ませんでした。
- 6). ちなみに、Gメールの「下書き」もデータの共有に使えます。
- 7). 「Windows11」のエクスプローラでの「zip」圧縮は注意が必要です:
- 8). zip 圧縮時の文字化けの回避:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----
- 17. 参考: 「Windows11」の日本語のフォルダ名を英語に変更:
- 1). 「Windows ターミナル」で確認:
- 2). 各フォルダごとに英語のフォルダ名に変更します:
- 3). エクスプローラを開きます:
- 4). 英語にしたい「日本語」のフォルダを開き、「desktop.ini」、または「desktop」ファイルを右クリック→「プログラムから開く」→「メモ帳」
- 5). 「ピクチャ」フォルダの下の「スクリーンショット」フォルダも忘れずに、「desktop.ini」ファイルを修正します。
- 6). 「Windows11」を再起動:
- 7). エクスプローラを開き、確認:
- 8). Windows + PrintScreen で、スクリーンショットを保存して、ファイル名を確認:
- 9). エクスプローラの設定を元に戻します:
- 注意: 大きな Windows Update があると、元の「日本語」のフォルダ名に戻ってしまう可能性があります:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ---
- 18. 参考: 「WSL2」で「クリップボードの共有」機能を有効化:
- まとめ
- -
-
-
-