Monday, April 29, 2013

Japanese Input - Arch Linux - ibus and mozc

To get Japanese Input working I tried various walkthroughs and many different packages and settings on Arch Wiki's. All of which are still excellent for information pertaining to each individuals needs.
However with that said...after I magically got it working...as sometimes happens, I didn't know what I did to get it working ><

So I cracked out my Arch Linux Laptop and started thru the process documenting what I did and making sure I understood what it was doing. At the end, I once again finally got the Japanese Input to work in Arch Linux but this time I had weeded out the junk and made sure that each step was crucial to actually pulling this task off for future installations of Arch for mine and your sanity. This is my documentation of what I did and if you follow this guide I am confident you will also have Japanese Input by the end of this tutorial.(If some steps are redundant or not needed I apologize.)

My Machine at the time of installation:
Date: 04-29-13



 Install Japanese Input in Arch Linux
(I use AUR for all my packages in this install, go here for help with that)

1. Install some fonts that look better for Kana.

    yaourt -S otf-ipafont ttf-droid

2. Install uim-mozc and ibus (This may take a while, just read what is asking and choose yes or no)

    yaourt -S uim-mozc ibus

4. Install Japanese Dictionary from this link:

    http://en.sourceforge.jp/projects/alt-cannadic/releases/?package_id=6129

    I downloaded this one at the time:
    http://en.sourceforge.jp/projects/alt-cannadic/downloads/45202/alt-cannadic-091230.tar.bz2/

Enter the following commands in terminal"

mkdir ~/.anthy
mkdir ~/.anthy/imported_words_default.d
cp alt-cannadic-091230/extra/*.t ~/.anthy/imported_words_default.d/

5. Add mozc to enabled items

    uim-pref-gtk

 then click Edit and move mozc over to enabled

6. Add the following to ~/.xinitrc

   export GTK_IM_MODULE=ibus
   export XMODIFIERS=@im=ibus
   export QT_IM_MODULE=ibus
   ibus-daemon -d -x &
   
7. Log out and Back In.

8. Right click on ibus in systray and goto Preferences

9. Add English (Place it on top for default Lang choice)

10. Add Japanese mozc

11. I would reboot and log in fresh to make sure all settings are holding and working.

12. Try opening terminal and maybe a web interface and make sure you can type in English, then press Ctrl+Space to choose Japanese then try and type in Kana.

Hopefully you are typing in Japanese now!
がんばって!!!!!!


Here are the sites that probably will help best for reference sake:
     https://wiki.archlinux.org/index.php/Input_Japanese_using_uim
     https://wiki.archlinux.org/index.php/IBus

yaourt - AUR Installation

Make sure yajl (JSON Library)is installed with this:

sudo pacman -S yajl

Go here and download package-query:
https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz

Go where you downloaded and do the following:
tar -zxvf package-query.tar.gz
cd package-query
makepkg
sudo -U package-query-1*(current install number)
Go here and download yaourt
https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz

Go where you downloaded and do the following:
tar -zxvf yaourt.tar.gz
cd yaourt
makepkg
sudo -U yaourt-1*(current install number)
Finally update your repositories:
yaourt -Syu

Some helpful commands:

Install:
yaourt -S package-name

Search:
yaourt -Ss package-name

Remove:
yaourt -R package-name