~ UNIX and Linux System Administration

Installing Xubuntu 15.04

I installed Xubuntu onto a SSD recently, and and some things I had to work through.

One big one was the setting up of the system to be able to handle foreign language input. There were a couple of problems here.

First, there are several aspects and they get confused and mixed together frequently:

Language

Regional preferences

Keyboard layout

Input method

The first place one might go to is the Language preferences; however, this only sets the desktop and application language, such as in menus, menu bars, application dialogs, and so forth. This sets the language of the system, nothing more. It is relatively straight-forward to add languages here: click on the Install/Remove Languages button and place a checkmark on the ones you want and remove it from those you don’t.

The next place one will probably check or think to check is the Region settings for date, time, numbers, currency, and related. For example, in North America a number might be shown as 250,000.00 – whereas in Europe, one would see 250.000,00 for the same number.

Chances are, once you set your region to what you use locally, this won’t change even if the language you are using does.

Then the problem of how to type in a foreign language comes up. Not much use to a language if you can’t type in it, right? For me, the challenges in this case are French, Esperanto, Japanese, and Russian. Definitely not your typical mix!

French was the easiest. Since the French use the Latin alphabet, like English, the question was how to make the French accents. There is no way on the normal keyboard to do this. Using a French keyboard makes it easy, but I don’t have one – but rather the typical US keyboard. What to do?

There are two possible fixes – the AltGr or Compose method, and the dead keys method. I chose the dead keys method. What this does is makes some of the standard keys act like modifiers, providing the accents necessary for French and similar languages (it works for Esperanto, for example). To use a dead key like the single quote, double quote, back-quote, or tilde, you type it and then the character desired. For example, consider the French verb éspèrer, the Esperanto word ĉe, or the Spanish word señor – all created with the US keyboard with dead keys.

You set this up using the Keyboard setting panel. Add a new layout, and choose the English (US, international with dead keys) layout. There is also a English (UK, international with dead keys) layout, as well as the English (US, international with AltGr keys) layout alluded to before. I have not tried those.

Now with this keyboard added, this will make the accented Latin characters available to you. The Change Layout Option shortcut makes it easy.

However, this leaves Russian and Japanese as a final challenge. Both require a modification to the input method – but there is no input method configuration or set up on Xubuntu. Input methods on Xubuntu use something called iBus – which can be installed from the command line:

apt-get install ibus

What this does is to install iBus using the standard Xubuntu packaging system. IBus can be installed with the Ubuntu Software Center: add the item called Keyboard Input Methods.

To get the system set for Japanese, add a product called Anthy:

apt-get install anthy

This should install the Anthy setup and configure it for you. You need to log out and back in to make Anthy active and operational.

After a relog, go to the Language Support setting panel and choose IBus for the input method. Then go to the Keyboard Input Methods panel and select the Input Method tab, and add the appropriate language input methods. I added the following:

Japanese – Anthy

Russian – Russian Phonetic

Close that out and you should have the input methods available to you. Note that having English, English with dead keys, Japanese (Anthy) and Russian available makes life a bit complicated.

You can switch input methods using the shortcut defined within the Keyboard Input Methods panel. The default is <super>space which works well. If you wish to have a shortcut to be able to change keyboard layouts, make sure it doesn’t conflict with the shortcut for input methods or any other.

Anthy allows you to be able to input Japanese with a standard US keyboard layout (with or without dead keys). It uses the phonetic spelling to create hiragana: typing ohio generates おひお for instance. Using Anthy is pretty straight-forward, and I won’t cover it here.

Using the Russian input method acts more like a “new” keyboard layout – which can make things a little confusing, but not too much. It allows you to type Russian using the keyboard phonetically – so the Latin letters are mapped to their Russian equivalents: typing pa-russki generates па-русски for instance.

You can add the keyboard layouts (not input methods!) to the Xubuntu panel easily: right-click on an item on the panel, and select the menu item Panel… then Add New Items. If you see something totally unrelated – select a different item to right-click on the panel. Look for Keyboard Layouts and add that to where you want it on the panel.

The interaction between the input methods and the Keyboard Layouts panel is a bit interesting. I have four input methods that I can select: English (US), English (US, international with dead keys), Anthy, and Russian (phonetic). Selecting one of the English options selects that keyboard layout and shows an English flag in the Keyboard Layouts panel. Selecting Anthy shows an English flag as well – using the English keyboard to generate Japanese. Selecting Russian shows the Russian flag and generates Russian.

There is also the once popular SCIM method of input – this is still supported but it appears that IBus is the future, and SCIM was not tried.

It should be a lot easier to support only French or Japanese or Russian – but now you know how, and supporting all three is doable. Once again, Linux and Ubuntu show their high-quality support for international languages.

Mei Douthitt

Mei is an experienced UNIX and Linux system administrator, a former Linux distribution maintainer, and author of two books ("Advanced Topics in System Administration" and "GNU Screen: A Comprehensive Manual").