LoginSignup
3
4

More than 5 years have passed since last update.

CentOS 7 で日本語入力関連設定

Last updated at Posted at 2015-08-01

前提

CentOS7 でも標準の Gnome デスクトップ環境であれば、簡単に日本語入力ができるのだが、私は Gnome を経由しない XMonad 環境を使っているので、設定が必要だった。

やったこと

$ sudo localectl set-keymap jp-OADG109A
$ sudo localectl set-locale LANG=ja_JP.utf8
$ sudo localectl --no-convert set-x11-keymap jp106
$ ibus-setup

日本語を Ctrl+Space で入力できるように設定

ibus-setup を実行すると日本語入力時はちゃんと日本語キーボードのレイアウトなのだが、アルファベット入力のときに、なぜか英語キーボードのレイアウトとなった。理由は不明。

対処として .bash_profile に下記を追記した。

.bash_profile
/usr/bin/ibus-daemon --daemonize --xim # おまじない
setxkbmap -rules evdev -model jp106 -layout jp

上記設定を .xinitrc や .xprofile に設定するのも試してみたが、うまくいかず、 .bash_profile で設定するとうまくいった。

詳しい人、教えてほしい。

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4