5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

mozc起動時のデフォルト入力をひらがなにする

Posted at

はじめに

ubuntuで日本語入力するのにmozcを使っていると、起動時に直接入力になっている
GUIからポチポチやれば設定を変えれるけど、毎回やるのがめんどくさい
デフォルト変えれるみたいなので変更してみた

環境

Ubuntu20.04

やり方

$ sudo apt update
$ sudo apt install build-essential devscripts -y
$ sudo vim /etc/apt/sources.list

deb-src http://jp.archive.ubuntu.com/ubuntu/ focal main restrictedのコメントを外す

$ sudo apt update
$ sudo apt build-dep ibus-mozc
$ apt source ibus-mozc
$ cd mozc-2.23.2815.102+dfsg/

kActivatedOnLaunchをtrueに設定する

$ vim src/unix/ibus/property_handler.cc
property_handler.cc
#if IBUS_CHECK_VERSION(1, 5, 0)
//const bool kActivatedOnLaunch = false; //この条件をtrueにする
const bool kActivatedOnLaunch = true;
#else
const bool kActivatedOnLaunch = true;
#endif  // IBus>=1.5.0

ビルドしてインストールする

$ dpkg-buildpackage -us -uc -b
$ sudo dpkg -i ../mozc*.deb ../ibus-mozc*.deb

再起動するとmozcのデフォルト入力がひらがなになった状態で起動する

以上

5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?