Ubuntu 8.10 amd64 で ATOK X3 を使う方法

本来 Ubuntu 8.10 i386 でしかサポートされない ATOK X3 for Linuxamd64 版でも使う方法。

参考リンク

先人たちの探求に感謝。

自分が実験した方法

VMwareUbuntu 8.10 amd64 版をインストールし、snapshot を作り、それからインストール実験。
失敗したら roolback 。

特殊な環境の場合

自分は以前 Ubuntu i386 で同じ home ディレクトリに ATOK X3 をインストールしていたので
~/.iiimf ディレクトリを消しておく必要がありました。

インストール方法

事前に nspluginwrapper をインストールし、[042459]ATOK X3 for Linux アップデートモジュールをダウンロードしておくこと。
それ以降は、ATOK X3 を Ubuntu Hardy(x86_64)にインストール | Weboo! Returns.さんの方法でそのまま。

$ sudo apt-get install nspluginwrapper
$ tar xzvf atokx3.tar.gz
$ cd ATOKX3
$ sudo -s
# export LANG=C
# touch /etc/gtk-2.0/gtk.immodules
# bash ./setupatok_tar.sh
This software is furnished under an end user agreement and may be used
or copied only in accordance with the terms of such license.
If you accept the terms of the license agreement,Please select "Yes".
If you do not accept the terms of the license agreement,Please select "No".
? (yes/no)yes
Input path of gtk-query-immodules-2.0 for 64bit application:
/usr/bin/gtk-query-immodules-2.0
Input path of gtk.immodules for 64bit application:
/etc/gtk-2.0/gtk.immodules
…
"/etc/gtk-2.0/gtk.immodules" will be changed.
"/etc/gtk-2.0/gtk.immodules" will be changed.
tar xfz /home/hide/Download/ATOKX3/bin/tarball/ATOK/atokx-20.0-1.0.0.i386.tar.gz
tar xfz /home/hide/Download/ATOKX3/bin/tarball/ATOK/atokx-64-20.0-1.0.0.x86_64.tar.gz
Installation has been completed.

# cd bin/tarball/IIIMF
# tar xzvf iiimf-client-lib-trunk_r3104-js1.i386.tar.gz
# tar xzvf iiimf-protocol-lib-trunk_r3104-js1.i386.tar.gz
# mv ./usr/lib/* /usr/lib32	

# wget http://ftp.ussg.iu.edu/linux/ubuntu/pool/main/t/tcp-wrappers/libwrap0_7.6.dbs-14_i386.deb
# dpkg --fsys-tarfile libwrap0_7.6.dbs-14_i386.deb | tar xf -
# mv ./lib/libwrap.so.0* /usr/lib32/
# /sbin/ldconfig

# tar xzvf atokx3up2.tar.gz
# cd atokx3up2/bin/ATOK/
# tar xzvf atokxup-20.0-2.0.0.i386.tar.gz -C /
# cd ../IIIMF/
# tar xzvf iiimf-server-trunk_r3104-js3.i386.tar.gz --exclude='./usr/lib' -C /
# tar xzvf iiimf-server-trunk_r3104-js3.i386.tar.gz ./usr/lib
# mv ./usr/lib/* /usr/lib32/	
# sudo bash /opt/atokx3/sample/setting_debian4.sh	

ログアウト後、ログインすれば ATOK が起動しているはず。

Emacs から使う設定

IIIMECF という Emacs Lisp を介して ATOK X3 を使う。
ATOK X3 for Linux のインストールさんの所が詳しい。


IIIMECF のキーバインドが気に入らない場合は直接 iiimcf.el を書き換える方法をとる。

  (defvar iiimcf-keycode-spec-alist
    `((13 10 0)
+     (11 37 65535) ; C-k
+     (12 39 65535) ; C-l
+     (9 37 65535)  ; C-i
+     (15 39 65535) ; C-o
+     (7 27 65535)  ; C-g
+     (16 38 65535) ; C-p
+     (14 28 65535) ; C-n
+     (2 113 65535) ; C-b
+     (6 114 65535) ; C-f

C-f, C-b による文節移動を実現するには ATOK 側で F2/F3 を文節前移動、文節後移動に割り当てる必要がある。


IIIMECF のインストール自体は README に従うだけ。

(setq iiimcf-server-control-hostlist (list (concat "/tmp/.iiim-" (user-login-name) "/:0.0")))
(require 'iiimcf-sc)
(setq iiimcf-server-control-default-language "ja")

(setq iiimcf-server-control-default-input-method "atokx3")

(setq default-input-method 'iiim-server-control)
;; Shift-Space または 半角/全角 でも起動
(global-set-key [zenkaku-hankaku] 'toggle-input-method)

/var/log/messages を見ると iiimd が落ちている。使えているから良いけど気持ち悪い。

Apr  6 21:15:25 sewashi iiimd[6362]: started.
Apr  6 21:15:26 sewashi iiimd[6362]: Client shut down the connection owned by im_id(1).
Apr  6 21:15:28 sewashi iiimd[6362]: Client shut down the connection owned by im_id(1).
Apr  6 21:16:11 sewashi kernel: [  138.162799] iiim-xbe[6425]: segfault at 24 ip 00000000f7e7a229 sp 00000000f797fb88 error 4 in libX11.so.6.2.0[f7e5e000+eb000]
Apr  6 21:16:11 sewashi iiimd[6362]: Client shut down the connection owned by im_id(1).


ATOK X3 for Linux