Site Tools


Sidebar

languages:japanese:linux:japanese_input

Activating japanese input

Typing in Japanese Kanji, Hiragana and Katakana is really easy - once you know how to do it. If you do not know it is hard to get a grip, to get that started. The much more verbose documentation from Scott Robbins: https://srobb.net/jpninpt.html . Ibus/anki are a classical combination on Linux, fcitx/mozc and others are newer and can be used.

Japanese input with on Gnome3/default mode

These instructions work on Gnome3, with the default mode. The other, alternative mode is “classic”, and looks more like Gnome2. Using these instructions on Fedora32. This uses ibus-kkc.

  • Requirements:
    • Ensure group input methods is installed: 'dnf groupinstall input-methods'
    • Ensure some packages are installed: 'dnf install ibus-gtk3 ibus-kkc ibus-qt vlgothic-p-fonts'
    • If Gnome and X11 are not yet installed, use 'dnf groupinstall gnome-desktop'
  • Configuration: You should be able to follow these steps:
    • On the desktop, click on the top right the 'on-off symbol', then 'Settings'
    • Click 'Region & Language', below 'Input sources' press the plus-button
    • I 'Japanese' now shown?
      • If yes: Leftclick 'Japanese', then leftclick 'Japanese (Kana Kanji)' and then 'Add'
      • If no: Press the three dots at the bottom for 'more', then enter 'japanese' in the search field. Then leftclick 'Japanese', then again leftclick 'Japanese (Kana Kanji)' and then 'Add'
    • You should now be able to switch the input method to Japanese, using one of the following methods:
      • On the top right, a new pulldown menu should have appeared, showing 'en' by default. You can switch to 'Japanese (Kana Kanji)' in the menu.
      • Or you can switch input mode by pressing <superkey>+<space>. By default, the <superkey> is the Windows-key, between 'ctrl' and 'alt'. These are the default keys, the combination can be changed in the keyboard settings.
  • Usage: Now to verify Japanese input works:
    • on the desktop, click 'Activities', in the search field input 'terminal', click 'Terminal'
    • you can now type things in ascii/english chars
    • press <superkey>+<space>, on the top right in the menu, 'en' switches to 'あ', so the input mode switched
    • type chichi<return>
    • you should see the hiragana ちち
    • type chichi<blank><return>
    • the additional blank should complete the hiragana into the kanji 父

Japanese input with ibus-kkc on Gnome3/classic mode

These instructions work on gnome3, i.e. on Fedora28/RHEL7.

  • requirements:
    • Ensure group input methods is installed: 'yum groupinstall input-methods'
    • Ensure some packages are installed: 'yum install ibus-gtk3 ibus-kkc ibus-qt vlgothic-p-fonts'
    • If you have not even Gnome/X installed, use 'yum groupinstall gnome-desktop x11'
  • configuration: You should be able to follow these steps:
    • on the desktop, click on the top left 'Applications', 'System tools', 'Settings'
    • click 'Region & Language', below 'Input sources' press the plus-button
    • if 'Japanese' is shown, leftclick it, and then 'Add'. If it is not shown, press the three dots at the bottom for 'more', then enter 'japanese' in the search field. Then leftclick 'Japanese' and then 'Add'.
    • select 'Japanese (Kana Kanji)' and 'Add'
    • You should now be able to switch the input method to Japanese, pressing <superkey>+<space>. These are the default keys, the combination can be changed in the keyboard settings.
  • usage: Now to verify Japanese input works:
    • on the desktop, click 'Activities' → Applications → 'Terminal'
    • you can now type things in ascii/english chars
    • press left ctrl key, keep it pressed
    • additionally press spacebar for a moment. An additional menu appears in the middle of the screen. Keep ctrl pressed, press spacebar some times, until 'Anthy' is selected.
    • release ctrl
    • type chichi<return>
    • you should see the hiragana ちち
    • type chichi<blank><return>
    • the additional blank should complete the hiragana into the kanji 父

Japanese input with ibus/anthy on gnome2

These instructions work on gnome2, i.e. on Fedora10/Centos6/RHEL6.

  • requirements: Some packages installed, i.e. using “yum groupinstall Japanese\ Support”
  • configuration: You should be able to follow these steps:
    • on the desktop, click system → preferences → input method
    • check 'enable input method feature'
    • select 'use ibus'
    • click 'input method preferences'
    • click 'input method'
    • 'select input method'
    • japanese → anthy
    • 'add'
    • 'japanese - anthy' should appear below input method
    • 'close'
    • 'close'
  • usage: Now to verify it works:
    • Open the 'Applications' menu, click 'System Tools' and 'Terminal'
    • you can now type things in ascii/english chars
    • press left ctrl key, keep it pressed
    • additionally press spacebar for a moment
    • release ctrl
    • type chichi<return>
    • you should see the hiragana ちち
    • type chichi<blank><return>
    • the additional blank should complete the hiragana into the kanji 父

Japanese input with fcitx/mozc on Debian stable

as root: apt-get install fcitx-mozc fcitx-tools im-config
ad root: apt-get install fcitx-config-gtk fcitx-config-gtk2 \
           fcitx-frontend-gtk2 fcitx-frontend-gtk3 mozc-utils-gui
as user: im-config -c

Japanese input with ibus/mozc on Fedora

yum install im-chooser ibus ibus-mozc mozc
im-chooser
im-config -c

ibus-setup # select mozc for input

# if not running gnome3, 
# ensure the following are run, i.e. in .xsession
ibus-daemon --xim --daemonize
export IMSETTINGS_INTEGRATE_DESKTOP=yes
export IMSETTINGS_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus
# exec wmaker

Japanese input with fcitx/mozc on Fedora

Fedora20 has no fcitx-mozc package, we need to build one.

# as root
yum install rpm-build gcc-c++ 
yum install openssl-devel libstdc++-devel zlib-devel libxcb-devel \
  protobuf-devel glib2-devel qt-devel zinnia-devel gtk2-devel gyp fcitx-devel

# as user
mkdir -p /mnt/store/rpm/rpmbuild20
echo '%_topdir        /mnt/store/rpm/rpmbuild20' >~/.rpmmacros 
cd /mnt/store/rpm/rpmbuild20

# get latest src package from Fedora19 for evample via
# http://rpm.pbone.net/index.php3/stat/4/idpl/23409349/dir/fedora_19/com/fcitx-mozc-1.11.1502.102.1-2.1.x86_64.rpm.html
rpm -ivh ~/Downloads/fcitx-mozc-1.11.1502.102.1-2.1.src.rpm 

# get the latest fcitx-mozc
wget http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-1.13.1651.102.1.tar.xz
cp fcitx-mozc-1.13.1651.102.1.tar.xz SOURCES/

vi SPECS/fcitx-mozc.spec
# change 1.11.1502.102.1 to 1.13.1651.102.1

rpmbuild -ba SPECS/fcitx-mozc.spec 

sudo yum localinstall RPMS/x86_64/fcitx-mozc-1.13.1651.102.1-2.1.x86_64.rpm

export IMSETTINGS_INTEGRATE_DESKTOP=yes
export IMSETTINGS_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx

Japanese input on Ubuntu 14.04 LTS

  • This can probably be more streamlined
# First install mozc.
# open a terminal, then:
sudo su -
apt-get update
apt-get install ibus-qt4 ibus-mozc
# logout and login again, this restarts ibus-daemon

# then on the top right, click the keyboard language symbol
- "Text Entry Settings.."
- click "+"
- search for "Japanese (Mozc)" and add it
- close the dialog
# then on the top right, click the keyboard language symbol again
# you should see "Mozc", "Anthy" etc. here
- pressing the key combination to activate (super + space by default)
- this changes the language symbol, press multiple times for Mozc
- type Japanese in the terminal or applications
  • debugging:
# open a terminal, then
im-config
# here ensure "ibus" is selected.

fcitx-mozc, mozc-ut

languages/japanese/linux/japanese_input.txt · Last modified: 2024/03/03 07:58 by chris