Enabling Urdu Support in Ubuntu

Ubuntu

Note: Their is an updated version of this guide available. If you are using Ubuntu 9.04 or higher then please follow the new instructions here.

Writing and Reading in Urdu on Ubuntu is not configured properly in a default installation. So most Urdu users face trouble once they have installed Ubuntu. Sometimes they give up too quickly and get back to windows and sometimes they spend hours figuring out a solution.

First of all I would like to assure that any one using Ubuntu can read and write Urdu just like they did it while using Windows. Ubuntu has full Urdu support, the problem is that you don’t have a few packages installed and a few settings tweaked. Just follow this step by step tutorial and you would have full Urdu support available with in minutes.

Step 1: Make sure that you have these packages installed:

  • language-pack-ur
  • language-pack-ur-base
  • language-pack-gnome-ur
  • language-pack-gnome-ur-base
  • language-support-ur
  • openoffice.org-l10n-ur-in
  • ttf-nafees

If you are using Kubuntu then you would need:

  • language-pack-kde-ur
  • language-pack-kde-ur-base

To install these packages quickly use this command:


sudo apt-get install language-pack-ur language-pack-ur-base language-pack-gnome-ur language-pack-gnome-ur-base language-support-ur openoffice.org-l10n-ur-in ttf-nafees language-pack-kde-ur language-pack-kde-ur-base

Step 2:Note: If you are using Ubuntu 7.10 Gutsy or later releases then you don’t need to do this step instead jump to step 3.

Since Dapper, there is a problem with Firefox in Ubuntu that it doesn’t render the Urdu web pages the way they should be rendered. Firefox that comes with Ubuntu has Pango disabled by default. We need to enable it so lets do it

Type this in Terminal:


sudo gedit /etc/environment

This command will open the environment file in your text editor with super user priviledges. Add this line in environment file:


MOZ_DISABLE_PANGO=0

Save the file and exit the editor. Now we have Firefox ready to render Urdu web pages.

Step 3: With Firefox working fine and all required packages installed. We still need to download and install fonts. While downloading packages we have installed ttf-nafees (Nafees Web Naskh) but there is another popular Urdu font that you need in order to view most Urdu webpages correctly. The font is BBC’s Urdu Naskh Asiatype. You can download it from here.

Open Terminal and type this:

sudo nautilus /usr/share/fonts/truetype

this will open a Nautilus window, paste your fonts here.

Step 4: Now we need to download a Urdu phonetic keyboard layout. You have many choices here you can use Crulp’s Phonetic Urdu Keyboard Layout or use Urdu Web’s keyboard layout. I use Urdu Web’s keyboard layout and you can download it here. After downloading your keyboard layout rename it to pk not pk .txt just pk and type this command in terminal:


sudo nautilus /etc/X11/xkb/symbols

This command will open a Nautilus window. Paste the pk file in symbols directory replacing the pk keyboard layout that comes with Ubuntu by default.

Step 5: Point your mouse to an empty space on your Top or Bottom Panels, right click and select Add to panel. A window will open giving you choices of applets to add on your panel. Select Keyboard Indicator and then press Close button. Now you have an applet on your panel showing the default USA. Take your mouse over there and right click to select Keyboard Preferences. In the Layouts tab press the Add button. Now select Pakistan from the list of Available layouts and then press Ok and then press Close.

Now you have Phonetic Urdu keyboard layout and you can switch between US English and Urdu by clicking on the indicator or by pressing both ALT keys together.

Step 6: Restart your computer.

Now check if you can not read, write and edit Urdu web pages, text files and documents on your Ubuntu box. Still having problems? Please make sure that you have followed the instructions exactly as provided above. If every thing is all right and you think you have followed the instructions then leave a comment so that we can improve this tutorial.

Related Posts

12 thoughts on “Enabling Urdu Support in Ubuntu

  1. I am getting error: “couldn’t find package language-pack-ur” in one terminal. Kindly help

  2. شرکیه بهت بهت محترم نعمان صاحب (:

  3. اعلی سر جی کیا بات ھے مین نے ءوبءنتء پعر کیے هیں فونٹس۔ تھینکس فار دی ٹءٹوریل

  4. Sajid I have Feisty, Debian Etch, Sabayon installed. The screenshot you provided shows that you have only one keyboard layout enabled ‘us’. Add keyboard applet to your panel and then add Pakistan. OR in Gnome Configuration Editor Select the key Layout, Right Click and select Edit Key. Press Add button and enter pk then pree OK button and close configuration editor. Log back in and please report back. If the problem isn’t solved please send me the result of:
    xprop -root | grep XKB

    Please use a valid email address to comment on this weblog. I wanted to send you an email so that we can figure out the problem quickly but it seems you used a fake email address. 🙁

  5. Sajid, It seems like your XKB settings conflicting with gnome keyboard preferences. To resolve this please follow these instructions:

    One: Remove keyboard applet from your panel.

    two: Open Terminal and type this:

    gconf-editor

    This will open Gnome Configuration Editor. From the list on your right hand Go to desktop > gnome > peripherals > keyboard > kbd (Screenshot)

    Check the box next to overrideSettings

    close configuration editor, log off and then log on now repeat the Step 5. Please let me know if it worked for you.

Leave a Reply

Your email address will not be published. Required fields are marked *