Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: xemacs/MULE with cannaserver and ckinput2 (was: PJE) (fwd)



Eric S. Standlee writes:

 > Questions:
 > 1)  what is the best way to set up the system to run cannaserver on
 > startup?
 > 2)  do I need an environment var initialized, if so where should I do
 > that?
 > 3)  It might be different, but in xemacs and kterm how do I initialize
 > input of Japanese characters, and just as important, how do I stop
 > Japanese input?

Well, I really don't think I know the *best* way to do any of these
things, but since noone else has answered yet, I'll tell you what
works for me.

1) If you have a System V -ish boot configuration (Red Hat,
TurboLinux?, maybe Debian, but I think not Slackware), you should have 
a 'canna' script in the init script directory (/etc/rc.d/init.d on
RedHat), and a symlink to it in the directory for the runlevel you
boot into ... e.g. on my box the /etc/rc.d/rc3.d directory includes
'S96canna'. The initial S means start, the number determines the order 
relative to other startup scripts. I don't know any reason why it has
to be 96, though I imagine you wouldn't want it at the very beginning
of the boot sequence. If you installed a binary RPM,
this was probably taken care of automatically. What may not have been
done automatically is creating the directory for the Canna
lockfile. Now this part is a little weird. I use the RedHat-contrib
version of Canna (but I built it from SRPM). When my Canna starts, it
creates a lockfile called /usr/tmp/.iroha_unix/IROHA. The docs say
that's the old way, no longer used, and you should have a
/var/lock/canna directory ... but evidently the docs are not
completely correct. Anyway, I have /var/lock/canna, which is never
used (but I think maybe I needed it to satisfy RPM or something), and
I have .iroha_unix in /var/tmp -- with /usr/tmp as a symlink to
/var/tmp ... because I think /usr/tmp is a dumb place for lockfiles,
but I didn't care to spend weeks mucking around in the code &/or
makefiles trying to actually fix it. Follow me so far?

2) Not sure what you need for kinput2 (I've never used it enough to
bother getting it set up completely), but for Canna I think you just
need to make sure the directory w/ the several Canna executables
(which may or may not be /usr/canna/bin or /usr/local/canna/bin) is on 
your $PATH. The place to do that is /etc/profile. E.g.:

PATH="$PATH:/usr/X11R6/bin:/usr/canna/bin"

and make sure the PATH is EXPORTed.

3) XEmacs: you need something like this in your .emacs:

(if (and (boundp 'CANNA) CANNA)
    (progn
      (load-library "canna")
      (canna) ))

Then the command to switch into Japanese input is
'canna-toggle-japanese-mode'. You might want to define a keybinding
for that; if I remember right, the default keybinding was very
inconvenient for me, so I set it to F12. AFAIK, F12 is not used for
anything by default, and it's easy to find.

For kinput2 in an xterm, well, kinput2 needs to be running, of course;
then I *think* you hit Shift-Spacebar to toggle it on and off.

Hope this helps.

Matt Gushee
Oshamanbe, Hokkaido
--------------------------------------------------------------
Next Nomikai: 18 September, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Meeting: 10 October, Tokyo Station Yaesu central gate 12:30
--------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links