There are three software layers and two protocol layers needed for the Linux user to be able to input Japanese into most applications.
Certain applications such as mule-canna, xemacs with wnn support, and nvi-m17n can talk to the Japanese conversion server directly and do not rely on a seperate front end processor or protocol such as XIM.
The next diagram shows two types of applications talking to the Kanji conversion server. The applications on the left communicate with a front end processor such as kinput2. The applications on the right have canna or wnn library support as part of the application and can talk directly to the conversion server. While it appears to be more efficient to compile the conversion libraries into every application, it is actually more common to use a FEP such as kinput across all applications to retain a consistent input procedure. Kinput2 can be used to input Japanese into most applications, including emacs and vi.