How to install a Japanese keyboard in Linux

This tutorial is about how to install a Japanese keyboard in Linux Mint Debian 2012-04-Mate and in Linux Mint Maya Mate 13.

Once the software is installed and configured, you can switch from English to Japanese (Romaji, Katakana, Hiragana and Kanji) whenever you wish.

日本語のインターフェースです。

Although for a specific distribution, it can also be used as a guide for working with other Linux distros.  It has not yet been tried on a system using the Cinnamon desktop environment or on KDE.  I wrote the tutorial here first in June 2011 as a Linux Mint post and at that time there were no problems installing on Linux Mint main edition, Linux Mint Debian, Ubuntu and Debian 6.00.  However, With all the new forks and directions now, with many leading developers now no longer willing to support well-loved older programs and going off on tangents of their own, the user will have to make some educated guesses at times, but hopefully the suggestions here will be a friend and a guide.

へへへへへへへへへ。。。へへへへへ。。。ぬ!

If you find delight in Japanese culture, in films, art, anime, manga or the beauty of their landscapes and islands, then you might like to try connecting a Japanese keyboard to your Linux Mint box, to help you to learn a little of the language and thereby understand more of the culture.

For myself, I am a great fan of Japanese cinema (and cinefilipino classic & magic realism as well). Recently I rewatched Space Travellers (2000) starring Takeshi Kaneshiro and Eri Fukatsu and Go Find A Psychic (2009) starring Masami Nagasawa. Both films are light comedies directed by Katsuyuki Motohiro, so light they almost float away, and heartily recommended.

へへへへへへへへへ。。。へへへへへ。。。ぬ!

Japanese keyboards that I have seen are Querty keyboards, with each key holding a larger letter of the alphabet in English and a smaller one in hiragana. In general, prices range from £20 to £50. My own keyboard is a cheaper model but it is easy to use and sturdy, perfectly fit for the job. Examples can be seen if you input ‘Japanese keyboards’ into Duck Duck Go, Startpage or whatever search engine you use, or you can use the search bar in Amazon or eBay.

へへへへへへへへへ。。。へへへへへ。。。ぬ!

This tutorial is mainly a guide. I have just installed the April 2012 version of Linux Mint Debian Mate and installed a Japanese keyboard according to the step-by-step instructions that follow, but remember that packages get upgraded and systems change, so if you install a Japanese keyboard in 5 or 6 months time, you may have to improvise a little.

(1) In your operating system menu, go to Control Centre/Keyboard/Layouts/ and click on Add.

A list of countries and keyboards will come up. Select:

Country: Japan

Variants: Japanese Kana

(2) Use Synaptic Package Manager to install a variety of Japanese fonts. In Synaptic search bar, type “fonts” (without the apostrophe) and install:

xfonts-int1-japanese

xfonts-a12k12

xfonts-jisx0213

xfonts-int1-asian (in case you need other Asian languages besides Japanese)

(3) Use Synaptic Package Manager to install:

scim-anthy and dependencies. This helps to convert from katakana to hiragana. Install:

anthy,anthy-common,libanthy0,
im-config(and dialog),
libscim8c2a,scim,scim-bridge-agent,
scim-bridge-client-gtk,scim-gtk2-immodule,
scim-modules-socket,scim-anthy,
scim-tables-ja, scim-modules-table,
scim-canna,libcanna1g,ack,kasumi,
ttf-takao and any dependencies(ttf-takao-gothic,ttf-takao-mincho)

NB. The package im-config removes and replaces im-switch.

NB. This time I found that scim-modules-table also installs the following dependencies:

fonts-arphic-bsmi00lp

fonts-arphic-gbsn00lp

scim-tables-zh

ttf-arphic-bsmi00lp

ttf-arphic-gbsn00lp

(4) For packages that are not available in the Linux Mint Debian repositories, try to download them from another trusted site. The Asian fonts ttf-takao are no longer to be found in LMDE. After searching around for an hour, I found scim-agent-bridge and a few others at:

http://packages.debian.org/hu/squeeze/

and you can use one of their mirrors such as:

http://ftp.fr.debian.org/debian

for example, I found:

http://packages.debian.org/hu/squeeze/scim-bridge-agent

http://packages.debian.org/hu/squeeze/scim-bridge-client-gtk

http://packages.debian.org/hu/squeeze/scim-gtk2-immodule

http://packages.debian.org/hu/squeeze/ttf-takao

From the Debian site, you can easily download the packages you need and install them with the Mint Gdebi Package Installer. It just takes a click of the mouse.

(5) Pluma is the name of the Text Editor in LMDE Mate. If you are using another text editor, then replace the command “pluma” with the name of your own text editor (gedit or kwrite etc).

Open a root terminal and edit your locales file so that your chosen languages are enabled:

# pluma   /etc/locale.gen

You will see a long list of names of languages starting with the # sign.

Scroll down the list and uncomment (delete the # sign that is in front of) the languages you need, so that you get:

en_US.UTF-8 UTF-8

en_GB.UTF-8 UTF-8

ja_JP.EUC-JP EUC-JP

ja_JP.UTF-8 UTF-8

You now have 2 types of common English and 2 types of Japanese without the # sign.

All the languages remaining with a # in front of them are available but will not be used – the # sign means that what follows is only a comment or description, and not an active process. Take away the # and the process comes alive.

Save your changes. Close down the file “locale.gen”.

Then in the terminal type the following command to generate these locales:

# locale-gen

If you are using an earlier version of Linux Mint, Linux Mint Debian, Debian or if you are using Solus 1, possibly all you need to do now is reboot, and you can try typing in Japanese.

However, the current 2012 versions of Linux Mint Debian and Linux Mint Maya 13 Mate will not be ready, for they are more complicated beasts.

(6) Scim-anthy will not be enabled by Linux Mint Debian Mate 2012 yet, so we have to do a little more in the terminal.

Open the root terminal and add some lines to your profile in /etc/profile:

# pluma   /etc/profile

and now add the following 6 lines to the file:

# SCIM

export XMODIFIERS=’@im=SCIM’

export GTK_IM_MODULE=”scim”

export XIM_PROGRAM=”scim -d”

export QT_IM_MODULE=”scim”

scim -d

and Save the file then close it down.

(7) Next add your locale to /etc/scim/global:

# pluma   /etc/scim/global

This file will look something like:

/SupportedUnicodeLocales = en_US.UTF-8
/DefaultPanelProgram = scim-panel-gtk
/DefaultConfigModule = simple
/DefaultSocketFrontEndAddress = local:/tmp/scim-socket-frontend
/DefaultSocketIMEngineAddress = local:/tmp/scim-socket-frontend
/DefaultSocketConfigAddress = local:/tmp/scim-socket-frontend
/DefaultPanelSocketAddress = local:/tmp/scim-panel-socket
/DefaultHelperManagerSocketAddress = local:/tmp/scim-helper-manager-socket
/DefaultSocketTimeout = 5000

If you see the line ‘/SupportedUnicodeLocales = en_US.UTF-8 ‘ as in the top line of the example above, then add the other languages to the line so that it becomes:

/SupportedUnicodeLocales = en_US.UTF-8, en_GB.UTF-8, ja_JP.EUC-JP, ja_JP.UTF-8

If for any reason that line is not there, then, add the following line to enable British English, American English and Japanese languages:

/SupportedUnicodeLocales = en_US.UTF-8, en_GB.UTF-8, ja_JP.EUC-JP, ja_JP.UTF-8

Notice that a comma separates the name of each language.

Save and Reboot to apply settings.

You are ready to start.

へへへへへへへへへ。。。へへへへへ。。。ぬ!

Practise Writing Some Words

After you have rebooted, you can practice writing some words in Japanese.

Open a text editor or Open Office or Libreoffice to test your settings.  An Input Window (a text editor page or Office page) must be open for the Japanese settings to start up.

With a Japanese keyboard, you can type Japanese in a text editor or office document but not, for example, in a Yahoo email.  I think to use such an email service, the user would have to type in a text editor, then copy and paste the text into the email body.

In the task panel, near the date and time, you will see the name of your default language e.g. en. Click on this and change it to Jpn, then press Ctrl+Spacebar and the Scim-Anthy Language Toolbar should pop up.

This toolbar will be available at all times.

Try typing a few letters in hiragana, then change the hiragana あ to the katakana ア in the Scim-Anthy Language toolbar (or click twice on the kana key next to right Alt) and type some letters in katakana.

Use Ctrl+ Space and the kana key next to Left Alt to switch between settings.

To type in kanji, write a word in hiragana and press the space bar twice, and a kanji menu will pop up. Select the correct kanji from that menu and press Enter.

Romaji: omoshiroi

Katakana: オモシロイ

Hiragana: おもしろい

Kanji: 面白い

English: Interesting

= ================= =

Original post written on 25 June 2011, this edition 12 September 2012

= ================= =

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: