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:
If you are using Kubuntu then you would need:
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:
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.