Installing KMFL on Ubuntu

From LSDevLinux
Revision as of 10:36, 24 November 2010 by Mayhewn (talk | contribs) (Reverted edits by Okopacare (Talk); changed back to last version by Kim blewett)

Jump to: navigation, search

Introduction

KMFL (Keyboard Mapping For Linux) lets you redefine the keyboard to type special characters. It basically does for Linux what Tavultesoft Keyman does for Windows. Starting with the Ubuntu Lucid distribution, KMFL works with IBus (Intelligent Input Bus for Linux).

These instructions assume that you already have a KMFL/Keyman keyboard source file. A compiled Keyman file for Windows (.kmx or .kmp) will not work. You will need the source file (.kmn). If you need to build your own, a KMFL programmers guide is available here. The Keyman Developer Programmer's Guide may also be useful.


KMFL on Ubuntu 9.10 Karmic and earlier versions (with SCIM)

Install scim-kmfl-imengine package using Synaptic Package Manager

  • If it's not done already, add packages.sil.org to Software Sources using the instructions at packages.sil.org.
  • Open either Applications->Ubuntu Software Center or System->Administration->Synaptic Package Manager.
  • Type kmfl into the Quick Search box of Synaptic or Software Center (upper right corner). Select the package scim-kmfl-imengine.
  • In Software Center click the Install button. In Synaptic click the box at the start of the package name, select Install, then click the Apply button. In either app, follow the prompts; you may have to supply your password. Close Synaptic or Software Manager once the installation is complete. Restart the computer.

Install and configure keyboards

To install and use keyboards in a SCIM-based system see Configure KMFL under Balsa - Jaunty/SCIM version

KMFL on Ubuntu 10.04 Lucid and later versions (with iBus)

Install ibus-kmfl package using Synaptic Package Manager.

  • If it's not done already, add packages.sil.org to Software Sources using the instructions at packages.sil.org.
  • Open either Applications->Ubuntu Software Center or System->Administration->Synaptic Package Manager.
  • Type kmfl into the Quick Search box of Synaptic or Software Center (upper right corner). Select the package ibus-kmfl “kmfl engine for iBus”.
  • In Software Center click the Install button. In Synaptic click the box at the start of the package name, select Install, then click the Apply button. In either app, follow the prompts; you may have to supply your password. Close Synaptic or Software Manager once the installation is complete. Restart the computer.

Install a keyboard into iBus

You may install a keyboard either for a single user's use or to be available to all users of your computer.

  • For a user-specific keyboard
  1. Log into the user's account. Open Places—Home Folder, or Places—[username].
  2. If you can not see numerous folders with names starting with "." (period/fullstop), from the View menu select Show Hidden Files. Check for a folder named ".kmfl". If it is not there, from the File menu select Create Folder, and name this folder .kmfl .
  3. Copy the .kmn file to ~/.kmfl and the icon file to ~/.kmfl/icons. You may need to create another new folder icons inside .kmfl.
  • For a system-wide keyboard
  1. Log into an account with sudo privileges. Open Places—Home Folder, or Places—[username].
  2. Copy the keyboard file (.kmn) and the corresponding icon file (.bmp; .png; jpg) to your Downloads folder /home/[username]/Downloads (or a folder of your choice).
    For illustration, we've used the name mykeyboard.kmn for the keyboard file and myicon.bmp for the icon file. Replace those names in commands below with the names of the files you have used. Replace Downloads if you used a different folder in 2.
  3. Run Terminal and enter the following commands:
sudo mkdir -p /usr/share/kmfl/icons
sudo cp ~/Downloads/mykeyboard.kmn /usr/share/kmfl/
sudo cp ~/Downloads/myicon.bmp /usr/share/kmfl/icons/
  • For either type of keyboard installation
  1. Open System-->Administration-->Language Support. If you see a message, "The language support is not installed completely," click Remind me later.
  2. Check to be sure the Keyboard Input Method System is set to ibus. Close this window.
  3. Now log out and back in again to Ubuntu, or if the ibus keyboard icon is showing in your system tray you may left-click it and select restart to get the new keyboard(s) registered.

Configure iBus to display your keyboard

  • Open System-->Preferences-->iBus Preferences.
  • On the Input Methods tab, click Select an Input Method. Find the keyboard you wish to make available and click Add. If your kmfl keyboard has a "store(&language)" line in the header section, then the keyboard will fall under that language in the ibus keyboard list; otherwise you will find it at the end of the keyboard list under "Other."
  • Experiment with the settings on the General tab. You may enable either an icon in the panel system tray or a separate language panel/bar, or both. They have different features, but to enable a keyboard left-click on either and select your keyboard.
**The keyboard list only appears when the active window allows text input (email, text editor, etc)! If this is not the case you will not see your keyboard when you click on the iBus icon.

Enable your keyboard in a text application

  • To test your keyboard, close the iBus Preferences window; open a new file for editing (Accessories-->GEdit). Left-click on either the system tray keyboard icon or the Language bar icon. Select your keyboard and start typing. The Language bar may be dragged around the screen using the little handle at the left. This should work in any application that allows text entry.

Uninstall a keyboard

  • For a user-specific keyboard delete the (.kmn) file from the user's home folder: ~/.kmfl, and the (.bmp) file from ~/.kmfl/icons.
  • For a system-wide keyboard log in as a user with sudo privileges. Then open a Terminal and enter the following commands, substituting the filenames of your keyboard and icon files as described above.
sudo rm /usr/share/scim/kmfl/mykeyboard.kmn
sudo rm /usr/share/scim/kmfl/icons/myicon.bmp


Notes regarding appearance and behaviour of iBus

  • If you enable more than one keyboard for any language, including "Other," those keyboards will appear on a secondary cascading menu. This doesn't seem to be changeable for the current version of iBus; if you would like to see this or another feature change you may request it on the ibus issues website at http://code.google.com/p/ibus/issues.
  • In the iBus--Input Methods screen it says "the first keyboard in the list is default. Move keyboards up and down to set the default." I haven't been able to make this work.
  • Be careful not to drag the Language bar so far up or down that the handle leaves the visible screen area! If this happens you can use alt+drag to get the handle back in view.