Solaris jserver カスタマイズ

jserver は Wnn のかな漢字変換サーバである。既定の設定のままでも動作する。ここでは設定を変えたい場合の情報を書く。

前提: Wnn8 を使えるようにする

Solaris 11 の既定の入力方式フレームワークは IBus である。Wnn8 を使うには、IIIMF と Wnn のパッケージをインストールし、入力方式フレームワークとして IIIMF を選ぶ。

pkg install system/input-method/iiim system/input-method/iiim/wnn

「システム」→「設定」→「入力方式セレクタ」で IIIMF を選び、ログアウトしてからログインし直す。

jserver とライセンスサーバ dpkeyserv は既定では起動しない。次のコマンドで起動する。管理者権限が必要である。

svcadm enable wnn8/server
svcs wnn8/server

/etc/wnn/dp/dpkeyservlist

jserver が接続するライセンスサーバのホスト名を、1 行に 1 つ書く。jserver は上から順に接続を試みる。設定例は次の通り。

localhost
nagisa

/etc/wnn/dp/dpkeyallow

dpkeyserv への接続を許可するホスト名を、1 行に 1 つ書くアクセス制御ファイルである。設定例は次の通り。

localhost
nagisa

/usr/lib/wnn/ja_JP/jserverrc

jserver の初期化ファイルである。jserver の起動時に読み込まれる。設定例は次の通り。

jserver_dir @LIBDIR/@LANG/dic

readfile pubdic/kihon.dic
readfile pubdic/koyuu.dic
readfile pubdic/jinmei.dic
readfile pubdic/chimei.dic
readfile pubdic/computer.dic
readfile pubdic/setsuji.dic
readfile pubdic/special.dic
readfile pubdic/symbol.dic
readfile pubdic/tankan.dic
readfile pubdic/tankan2.dic
readfile pubdic/full.fzk
readfile pubdic/std.fzk

;           n nbun 主要語頻度 短文節長 主要語長 直前使用 辞書 短文節評価 長文節長 短文節数 数字 かな 英数 記号 閉括弧 付属語 開括弧
def_param   5 10   2         45       0       80       5    1          20       0        400  -100 400  80   200    2      200

set_giji_eisuu '-' '_' 0x20

主な項目の意味は次の通りである。

jserver_dir に置かれている辞書は、次のコマンドで確認できる。

ls /usr/lib/wnn/ja_JP/dic

jserverrc を編集したら、jserver を再起動して設定を反映させる。管理者権限が必要である。

svcadm restart wnn8/server
svcs -x wnn8/server