Home›VS Code / Dev Env›ChromeOSのLinux環境でVS Codeに日本語入力:fcitx不要、必要だった起動オプションは3つ
ChromeOSのLinux環境でVS Codeに日本語入力:fcitx不要、必要だった起動オプションは3つ

ChromeOSのLinux環境でVS Codeに日本語入力:fcitx不要、必要だった起動オプションは3つJapanese Input in VS Code on ChromeOS Linux: No fcitx Needed, Just Three Launch Options

元記事を読むRead original articleqiita.com(新しいタブで開きます)(opens in a new tab)
AI 要約AI summary

Lenovo Chromebook Duet Gen 9(ARM64)のCrostini上のVS Codeで、Waylandまわりの3つの起動フラグを渡すだけで標準の日本語入力が使えた検証報告。.desktopの編集とaliasで常用する手順も扱うが、確認は筆者の1環境のみ。

On a Lenovo Chromebook Duet Gen 9 (ARM64) running Crostini, three Wayland-related launch flags let VS Code use ChromeOS's built-in Japanese input without fcitx5. Verified on one device only; .desktop and alias setup is covered.

AI 生成の要約と解説(解説は要約と収集メタデータに基づく)で、元記事全文の転載・翻訳ではありません。日本語版と英語版は言語ごとに独立して生成しています。正確性は元記事 (qiita.com) でご確認ください。AI-generated summary and explainer (the latter based on the summaries and collected metadata), not a copy or translation of the full source article. Generated independently for each language. Verify accuracy at the original source (qiita.com).

Lenovo Chromebook Duet Gen 9(ARM64)のLinux環境(Crostini)にVS Codeを入れると、そのままでは日本語が入力できなかった。筆者の環境では、fcitx5などを使わず、起動オプションを3つ付けるだけでChromeOS標準の日本語入力が使えるようになったという検証報告である。

3つの起動オプション

必要だったのは次の3つで、筆者の環境での実測とされる。

code --ozone-platform=wayland --enable-wayland-ime --wayland-text-input-version=1

筆者が確認できたのは「この3つを付けた構成で入力できた」ところまでだ。--wayland-text-input-version=1 が必要になった技術的な理由は確かめておらず、筆者は推測として記している。

追加IMEを使わない構成

fcitx5やibusなどの追加IMEは、起動も設定もしていない。筆者の環境にはfcitx5-mozcのパッケージが残っているが、起動も環境変数の設定もしておらず、今回の入力には使っていない。パッケージを削除した状態での動作は未確認である。

また、この環境でLinux側の初期値(ユーザ設定なしの状態)は GTK_IM_MODULE=cros だった。この方法では、この環境変数を変更しない。

常用のための設定

ランチャーやターミナルから普段使いするには、上記のオプションを自動で付ける設定が別途必要になる。具体的には .desktop の編集とaliasで、手順も合わせて紹介されている。

確認範囲と注意点

日本語入力を確認できたのは、メモリ8GB(Linux側から見える値は free -h の表示で約6.3GiB)の上記1環境だけである。Web上には別の成功例もあり、筆者は環境差が大きいと見ている。一方でCrostini上のVS Codeでは日本語入力が難しいという報告もあり、ChromeOSやVS Codeの更新で挙動が変わる可能性があるとされる。

Three Launch Options

This article reports how to get Japanese input working in VS Code inside the Linux environment (Crostini) on ChromeOS. The author installed VS Code on a Lenovo Chromebook Duet Gen 9 (ARM64) and found that Japanese could not be typed out of the box, which is a practical obstacle for anyone writing Japanese text in the editor.

After trial and error, the author found that no fcitx5 or similar input method was needed. Adding three launch options to VS Code was enough to enable ChromeOS's standard Japanese input. The options, as measured in the author's environment, are: code --ozone-platform=wayland --enable-wayland-ime --wayland-text-input-version=1.

What Was and Wasn't Confirmed

The author is explicit about the limits of the finding. What was established is only that input worked with these three options attached. The technical reason --wayland-text-input-version=1 is required was not verified, and the author offers an explanation only as a guess in step 2 of the write-up.

The author also states that fcitx5, ibus and other additional input methods were neither launched nor configured. The fcitx5-mozc package remains installed on the machine, but it was not started and no environment variables for it were set, so it played no part in the result. Behavior with that package removed has not been checked. On this setup, the Linux-side default was GTK_IM_MODULE=cros, and the method described does not change that variable.

Making It Work Day to Day

Typing the options by hand each time is not practical, so the article says that regular use from the launcher or the terminal requires extra setup to attach the options automatically. That setup consists of editing the .desktop file and adding an alias. The article walks through these steps.

Scope of the Result

According to the author, Japanese input was confirmed on only one device. The environment reports 8GB of memory, with roughly 6.3GiB visible from the Linux side as shown by free -h. The author notes that other successful reports exist on the web, but also that some accounts describe Japanese input in VS Code on Crostini as difficult, suggesting results vary widely between environments. The author adds that behavior may change with future ChromeOS or VS Code updates.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPokoChromebookで普段コードを書くとき、何が変わるの?日本語が打てなかったのが困りごとだったんだよね?If I code on a Chromebook, what changes day to day? Japanese typing in VS Code was the problem, right?
  2. TECHガイドTECH Guideこの記事では、VS Codeの起動オプションを3つ付けるだけで、ChromeOS標準の日本語入力が使えたそうです。fcitx5などは使っていません。In this write-up, adding three launch options to VS Code let ChromeOS's built-in Japanese input work. No fcitx5 or similar tools were used.
  3. ポコPoko前は入れられなかったの?fcitx5を入れるのが普通なのかなって思ってた。So it didn't work before? I assumed you'd need something like fcitx5.
  4. TECHガイドTECH Guideそのままでは入力できなかったと書かれています。ただ、他の方法との比較や、一般的にどうかまでは書かれていないので、違いは分かりません。It says VS Code couldn't take Japanese input out of the box. But comparisons with other methods aren't covered, so I can't say how it differs.
  5. ポコPokoじゃあ収穫は、追加ソフトなしで3つのオプションを付ければ打てた、ってことだね。毎回打つのは大変そうだけど。So the big win: three options, no extra software. Typing them every time sounds tedious, though.
  6. TECHガイドTECH Guideその通りです。日常使いには.desktopの編集とaliasが必要と書かれています。ただ確認は筆者の1環境だけなので、他の環境でも動くかが注目点です。Right. For daily use, the article says you'd edit the .desktop file and set an alias. It's verified on one device only, so whether it works elsewhere is the thing to watch.
記事情報・収集記録Article details & collection record
出典Source
Qiita VSCodeコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
日本語Japanese
重要度の位置づけImportance in this lane
MediumMedium priority(VS Code / Dev Env 56件中、同等以上 49件)(49 of 56 VS Code / Dev Env entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
1.9 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🔷VS Code / Dev Env の他の記事More from VS Code / Dev Envもっと見る →View more →

ページ上部へScroll to top